Must-do problems: Conditional Statements
90 min ยท Beginner
Need help? Ask a tutor on WhatsApp (opens in a new tab)These are the conditional problems every Python beginner should be able to solve, from a pass-or-fail check to billing slabs and date validation. Trace each one on paper with a small input first, test the boundary values, then check your program against every test.
What you will learn
What you will learn
- Choose between if-else, elif ladders and match-case for a decision
- Order conditions so that the right branch is reached first
- Combine checks with and, or and not, including boundary values
- Split a charge into slabs and check inputs before using them
Sign in to continue this lesson
Create an account to read every lesson, practise with the exercises and keep track of your progress.