Control the flow of your program using if, elif, and else.
Conditional statements allow your Python programs to make decisions during execution based on conditions. These are also known as control flow statements.
if condition:
# block of code if condition is true
elif another_condition:
# block if the elif condition is true
else:
# block if all conditions are false
age = 18
if age < 13:
print("You are a child.")
elif age < 20:
print("You are a teenager.")
else:
print("You are an adult.")
Output: You are a teenager.
You can place one if inside another for deeper decision logic.
num = 15
if num > 10:
if num < 20:
print("Number is between 10 and 20")
True or False.