Conditions coding challenges

Practise conditions with 25 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 · 24 Medium · 1

Skills you'll practise: ComparisonsInput validationAccumulatorsAge rangesBoolean flagsBoundary valuesBranchingCalendar rulesCeiling divisionChained conditionsCharacter replacementCombining conditions
  • Python · C++ · C#
  • Automated tests
  • AI code review
  • Community solutions
341
Challenges
245
Solutions shared
9
Languages

All challenges

Search by name or topic, or filter by difficulty.

25 challenges
Easy

Season From Month and Day

Given a month name and a day, return the season of the year in the Northern Hemisphere.

You'll learn Chained conditionsInput validation
BeginnerCS1ConditionsDates and timesFunctionsHomeworkIntro programmingStudent-beginner
No solutions yet
Easy

Caffeine Half-Life

Find how much caffeine is left in the body after a number of hours, given its half-life.

You'll learn ExponentsFloating point math
BeginnerCS1ConditionsFunctionsHomeworkIntro programmingStudent-beginner
No solutions yet
Easy

Mad Lib Builder

Fill the bracketed blanks of a story template with words, in order.

You'll learn String scanningCounters
BeginnerCS1ConditionsFunctionsHomeworkIntro programmingStudent-beginner
No solutions yet
Easy

Countdown Until Matching Digits

Count down from a two-digit number until both digits are the same.

You'll learn While loopsDigit extraction
BeginnerCS1ConditionsFunctionsHomeworkIntro programmingStudent-beginner
No solutions yet
Easy

Middle Item

Read numbers up to a negative sentinel and return the middle one.

You'll learn Sentinel valuesList indexing
BeginnerCS1ConditionsFunctionsHomeworkIntro programmingStudent-beginner
No solutions yet
Easy

Password Modifier

Strengthen a password by swapping some letters for symbols and adding its length at the end.

You'll learn Character replacementString building
BeginnerCS1ConditionsFunctionsHomeworkIntro programmingStudent-beginner
No solutions yet
Easy

Simple Statistics

Return the minimum, maximum and average of a list of whole numbers.

You'll learn AccumulatorsRunning minimum and maximum
BeginnerCS1ConditionsFunctionsHomeworkIntro programmingStudent-beginner
No solutions yet