Phase 1 - Level 1: Simple Conditions
Practice basic conditional thinking with simple if-else statements and boolean logic.
10 programs · open one, then the next
Start with Check if Number is Positive, Negative, or Zero- 01Check if Number is Positive, Negative, or ZeroBeginnerDecide whether a value is positive, negative, or zero. A beginner Python exercise on float input, ordered comparisons, and choosing one if-elif-else branch.Open example →py# Take a number as input num = float(input("Enter a number: ")) # Check if positive, negative, or zero
- 02Check if a Number is Even or OddBeginnerUse a remainder to classify whole numbers as even or odd. This first Python condition exercise includes zero, negative integers, and the meaning of modulo.Open example →py# Take a number as input num = int(input("Enter a number: ")) # Check if even or odd
- 03Check if a Number is Divisible by 5BeginnerTest divisibility by five with a short Python program. Beginners can trace int input, a modulo comparison, and the two possible printed results step by step.Open example →py# Take a number as input num = int(input("Enter a number: ")) # Check if divisible by 5
- 04Check if Divisible by Both 3 and 5BeginnerCheck whether an integer is divisible by both three and five. This beginner Python lesson explains two remainder tests and why and differs from or.Open example →py# Take a number as input num = int(input("Enter a number: ")) # Check if divisible by both 3 and 5
- 05Check if a Given Year is a Leap YearBeginnerApply the Gregorian leap-year rule with conditions. Students trace ordinary years, century exceptions, and multiples of four hundred without date libraries.Open example →py# Take year as input year = int(input("Enter a year: ")) # Check if leap year
- 06Take Two Numbers and Print the Larger OneBeginnerCompare two entered values and print the larger one, or report a tie. A beginner Python walkthrough of float conversion, strict comparisons, and equality.Open example →py# Take two numbers as input num1 = float(input("Enter first number: ")) num2 = float(input("Enter second number: "))
- 07Take Three Numbers and Print the LargestBeginnerFind the largest of three numbers without sorting. Students follow paired Python comparisons, tie handling with >=, and a separate final print statement.Open example →py# Take three numbers as input num1 = float(input("Enter first number: ")) num2 = float(input("Enter second number: ")) num3 = float(input("Enter third number: "))
- 08Temperature Range CheckBeginnerClassify a temperature as cold, warm, or hot using Python. Beginners examine ordered thresholds, decimal input, and exact boundary values at twenty and thirty.Open example →py# Take temperature as input temp = float(input("Enter temperature: ")) # Classify temperature
- 09Check if Character is Vowel or ConsonantBeginnerSeparate a vowel, consonant, or nonletter with string tests. This beginner lesson covers lowercasing, membership, and the single-character input assumption.Open example →py# Take a character as input ch = input("Enter a character: ").lower() # Check if vowel or consonant
- 10Check Character TypeBeginnerIdentify uppercase text, lowercase text, digits, or special input with Python. Students learn the order and limits of isupper, islower, and isdigit checks.Open example →py# Take a character as input ch = input("Enter a character: ") # Check character type