Decisions with Conditions Python lessons
if, elif, else, truth values, validation, and choosing between outcomes.
Core concepts
Problem-solving patterns
- if · modulo
- comparison · elif
- comparison · branches
- max · list
- boolean logic · calendar
What this topic builds
Learn the idea once, trace it through two verified cases, then explain why your approach works.
All 10 lessons in this topic
Work from top to bottom to build each concept gradually.
- #011Classify even or oddStarterPremium
Classify a locker number into the even or odd row.
- #012Classify a number's signStarterPremium
Classify a positive daily profit value.
- #013Find the larger of two valuesBeginnerPremium
Choose the larger of two supplier bids for a comparison report.
- #014Find the largest of three valuesBeginnerPremium
Find the highest score among three finalists.
- #015Detect a leap yearBeginnerPremium
Determine whether a scheduling year includes February 29.
- #016Convert a score to a gradeBeginnerPremium
Convert a valid assessment score to its letter grade.
- #017Set an age-based ticket priceIntermediatePremium
Quote the museum price for a school-age visitor.
- #018Validate and classify a triangleIntermediatePremium
Classify a triangular frame with three equal sides.
- #019Check a basic password policyIntermediatePremium
Validate a signup password that mixes letters and digits.
- #020Calculate a shipping feeAdvancedPremium
Determine shipping for a guest whose order reaches the free-shipping threshold.