MONG QI SHENG Moe
2 weeks ago
Mongcountry asked

How to write if than in Phyton

Sudip Bhandari
Expert
2 weeks ago

In Python, we use the if...else statement to make decisions. For example:

age = 19

if age >= 18:
    print("The person can enter inside the club.")
else:
    print("The person cannot enter inside the club.")

We have a dedicated lesson on if...else, so you’ll learn more about it as you continue the course.
For now, I recommend just keeping the flow and moving forward step-by-step.

If you want to jump ahead and learn about it right now, you can visit: if...else Statement | Programiz PRO

Hope this helps!

Python
This question was asked as part of the Learn Python Basics course.