Python loops can be used for many different purposes, such as creating animations, generating random numbers and repeating blocks of code.
This loop will iterate through the list of numbers and print out the number that is less than 10:
for x in range(1, 11):
print(x) if x< 10:
print("The number is less than 10")
else: print("The number is greater than or equal to 10")
While loops are used in Python to execute a block of statements repeatedly until a condition is met. When the condition in the programme becomes false, the line immediately after the loop is performed.
Learner's Ratings
4.4
Overall Rating
66%
19%
9%
3%
3%
Reviews
H
hamsinisekar
5
NICE
V
Vana raj P
5
Excellent speech and understanding
D
Dhanusha Sha
5
Super and expression
D
Deivanai
4
Python was using and learning laptop not mobile yaa ?? Pls reply me
R
Raja Sekar
5
excellent
M
M Anupriya Murali
5
Python programming with hand entha skill romba important my father former engalu keta cash illa ma entha skills ennala kathuka mudiyala epo free kathukura
M
MOHAMMAD HASSAN
5
"I've completed the course. Is there any way to get the certificate without payment? I'm currently unable to pay."
R
Ragul
5
Thanks for develop my skills in my mother tongue
V
Vignesh s
5
easy to understand
S
Smeena Sekar
5
Thank you for teaching in Tamil
Show More
Recommended Courses
The Complete JavaScript Course - Beginner to Advance
Share a personalized message with your friends.