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.5
Overall Rating
73%
18%
0%
9%
0%
Reviews
S
Subash Chandru
5
excellent teaching
S
Sneka Sneka
5
Good
3
31_NITHIYANANTHAM. P
5
Its super
4
41. Bhusnar Sajan
5
it is not learn english
P
Periyasamy M
5
Good
A
Antony Aswathi.N
4
Good
R
Rakesh Bhat
5
Nice Tutorial
M
MOHAN RAJ . J
4
wonderful the section
I
Inaamul Hasan
5
It's just awesome. we can able to learn as well as we can test by ourself at the end of one section!!!
Prashant
5
Nice Course
Show More
Recommended Courses
The Complete JavaScript Course - Beginner to Advance
Share a personalized message with your friends.