Skip to lesson content
Dev4Hub

Lesson 8 of 11

Python If...Else

1 min read1 sectionAI tutor ready

Conditional Statements

Python supports the usual logical conditions from mathematics. These can be used in if statements and loops.

If statement

Python
a = 33
b = 200
if b > a:
    print("b is greater than a")

Output

b is greater than a

You've reached the end of this lesson.

Mark it complete to keep your place in the course — it counts toward your progress and your streak.