# if-else
if age < 12:
print("Kitty!")
elif age < 18:
print("Cat!")
else:
print("Adult Cat!")
# simple if-else
print("Kitty!") if age < 12 else print("Cat!")
# while
i = 0
while i < 5:
print(i)
i += 1
# for
for i in range(5):
print(i)
for i in range(1, 5):
print(i)
fruits = ['apple', 'banana', 'orange']
for fruit in fruits:
print(fruit)
# loop-else
# code inside the else block will be executed only if the loop completes all
# iterations without any break statement being encountered.
i = 1
while i <= 5:
print(f"loop: {i}")
i += 1
else:
print("Loop completed without any breaks")
# break
i = 0
while True:
i += 1
if i > 5:
break
# continue
for i in range(5):
if i % 2 == 0:
continue
print(i)