Conditions coding challenges

Practise conditions with 9 coding challenges, from easy to hard. Every challenge runs in your browser with instant tests, an AI review of your code and community solutions to compare.

Easy · 8 Medium · 1

Skills you'll practise: Age rangesBoolean flagsBoundary valuesCalendar rulesCombining conditionsComparisonsCoordinatesDiagonalsHelper functionsNegationNo built-insOrdering conditions
  • Python · C++ · C#
  • Automated tests
  • AI code review
  • Community solutions
226
Challenges
2
Solutions shared
3
Languages

All challenges

Search by topic, language, or difficulty.

9 challenges
Easy

Days in a Month

Return how many days a month has, including leap years.

You'll learn Calendar rulesHelper functions
BeginnerConditionsFunctionsLearning-path
No solutions yet
Medium

Tic-Tac-Toe Winner

Decide the result of a tic-tac-toe board.

You'll learn Win conditionsDiagonals
BeginnerConditionsGridsLearning-path
No solutions yet
Easy

Password Rules Check

Check a password against simple strength rules.

You'll learn ValidationBoolean flags
BeginnerConditionsLearning-pathStrings
No solutions yet
Easy

Triangle Classification

Classify three side lengths as invalid, equilateral, isosceles, or scalene.

You'll learn Triangle inequalityOrdering conditions
ConditionsGeometry
No solutions yet
Easy

Letter Grade

Turn a test score into a letter grade.

You'll learn if/elif chainsRanges
BeginnerConditionsLearning-path
No solutions yet
Easy

Absolute Value Without abs

Compute an absolute value with a condition.

You'll learn NegationNo built-ins
BeginnerConditionsLearning-path
No solutions yet
Easy

Ticket Price by Age

Choose a cinema ticket price from the visitor's age.

You'll learn Age rangesBoundary values
BeginnerConditionsLearning-path
No solutions yet
Easy

Largest of Three

Pick the largest of three numbers without a built-in max.

You'll learn ComparisonsCombining conditions
BeginnerConditionsLearning-path
No solutions yet
Easy

Point Quadrant

Find which quadrant a point lies in.

You'll learn CoordinatesSign checks
BeginnerConditionsLearning-path
No solutions yet