Python supports if, elif, and else conditions.
x = 20
if x > 10:
print("Greater")
elif x == 10:
print("Equal")
else:
print("Smaller")
for i in range(1, 6):
print(i)
count = 0
while count < 3:
print("Hello")
count += 1
for i in range(5):
if i == 3:
break
print(i)
Take quizzes related to this topic and see where you stand!
Start Quiz Now