CodeLab Academy 📞 9936 6696
← Lessons 🐍 Python for Beginners

Conditions: if, elif, else

## if ```python age = int(input()) if age >= 18: print("Adult") else: print("Child") ``` > ⚠️ Put a **`:`** at the end of the `if` line, and indent the code inside it by **4 spaces**. ## elif ```python score = int(input()) if score >= 90: print("A") elif score >= 80: print("B") else: print("C") ``` ## Comparing `==` (equal), `!=` (not equal), `<`, `>`, `<=`, `>=`, plus `and`, `or`, `not`.
← Previous Next →

💡 Want to track which lessons you've read and solve problems for points? Sign up for free or log in.