ProgramsLogic building

Phase 1 - Level 2: Nested If & Multiple Conditions

Master nested conditions and multiple condition combinations.

10 programs · open one, then the next

Start with Check if Three Sides Form a Valid Triangle
  1. 01Check if Three Sides Form a Valid TriangleIntermediateTake three sides and check if they form a valid triangle.Open example →
  2. 02Determine Triangle TypeIntermediateIf sides form a valid triangle, determine if it is equilateral, isosceles, or scalene.Open example →
  3. 03Grade CalculatorIntermediateTake marks (0-100) and print the corresponding grade (A/B/C/D/F).Open example →
  4. 04Check if One Number is Multiple of OtherIntermediateCheck if one of two given numbers is a multiple of the other.Open example →
  5. 05Time-based GreetingIntermediateTake the hour of the day (0-23) and print "Good Morning", "Good Afternoon", "Good Evening", or "Good Night".Open example →
  6. 06Check Voting EligibilityIntermediateCheck voting eligibility for a given age (18+).Open example →
  7. 07Check Even/Odd PairIntermediateTake two numbers and determine whether both are even, both are odd, or one is even and one is odd.Open example →
  8. 08Check Alphabet RangeIntermediateTake an alphabet character and check if it lies between 'a' and 'm' or 'n' and 'z'.Open example →
  9. 09Print Day NameIntermediateTake a day number (1-7) and print the corresponding day name.Open example →
  10. 10Days in MonthIntermediateTake a month number (1-12) and print the number of days in that month (ignore leap years).Open example →