Services Work Learn About Contact
0/10
Lesson 6 of 10

Conditions

Use if, elif (else if), and else to make decisions. Python uses and, or, and not for logical operations. Indentation is critical — everything inside the if block must be indented.

PYTHON
score = 85

if score >= 90:
    print("Grade A")
elif score >= 80:
    print("Grade B")
elif score >= 70:
    print("Grade C")
else:
    print("Grade D")

# Combined condition
if score >= 60 and score < 70:
    print("Almost there")
🧠

Quick Quiz

Answer correctly to unlock the next lesson.

Support the mission

This learning platform is 100% free: no ads, no tracking, no paywalls. If it helped you learn something useful, you can support future lessons or donate to Doctors Without Borders, which provides emergency medical care in crisis zones worldwide.

🎉

You completed Python!

You finished all 10 lessons and quizzes. You now know the basics of Python.