📖 Coding lessons · 4 of 4 · 4 min

Decisions with if / else

Programs make decisions with if:

marks = int(input("Your marks? "))
if marks >= 90:
    print("Excellent!")
elif marks >= 33:
    print("Passed")
else:
    print("Try again, you can do it!")

Comparisons: == equal, != not equal, >, <, >=, <=. Join them with and / or.

💡 One = stores a value; two == compares two values.

🎯 Try it

In Python, which checks whether a equals 10?

Contact Shuddhi

Like what you see? Take the next step.

Start small and do more whenever you are ready — everything is free to join.

  1. GiveFor you

    Donate once or every month. 80G receipt by email from ₹100.

  2. Volunteer

    Weekends on the ground or online from home. Certificate after one month.

  3. Raise funds

    Start a free campaign for a cause, a person or an NGO and share it with friends.

  4. Lead & partner

    Take on more: coordinate a team, bring your NGO on board or partner as a company.