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
69%
19%
6%
6%
0%
Reviews
P
Prabhat Yadav
5
Superb and amazing 😍🤩 enjoyable experience.
N
Naveen Raj K
4
in dictionary session only there is half vedio available
S
S.Gokula kannan
5
Very good course in learn vern
S
Sathishkumar Balasubramaniyam
5
very good teaching
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
Show More
Recommended Courses
The Complete JavaScript Course - Beginner to Advance
Share a personalized message with your friends.