If Statements

Conditional Statements

Use if, elif, and else to control program flow based on conditions.

Code Examples
# If statements\nage = 18\n\nif age >= 18:\n    print("You are an adult")\nelif age >= 13:\n    print("You are a teenager")\nelse:\n    print("You are a child")