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 ZeroBeginnerTake a number and print whether it's positive, negative, or zero.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 OddBeginnerCheck if a number is even or odd using modulo operator.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 5BeginnerCheck if a number is divisible by 5.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 if a number is divisible by both 3 and 5.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 YearBeginnerDetermine if a year is a leap year based on leap year rules.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 numbers and print the larger one.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 LargestBeginnerCompare three numbers and find the largest.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 CheckBeginnerTake a temperature value and print "Cold", "Warm", or "Hot" using range conditions.Open example →py# Take temperature as input temp = float(input("Enter temperature: ")) # Classify temperature
- 09Check if Character is Vowel or ConsonantBeginnerTake a character and check if it's a vowel or consonant.Open example →py# Take a character as input ch = input("Enter a character: ").lower() # Check if vowel or consonant
- 10Check Character TypeBeginnerTake a character and check whether it's uppercase, lowercase, a digit, or a special character.Open example →py# Take a character as input ch = input("Enter a character: ") # Check character type