Phase 1 - Level 3: Math and Number Logic
Solve mathematical and number logic problems using conditionals.
10 programs · open one, then the next
Start with Check if All Digits are Distinct- 01Check if All Digits are DistinctIntermediateTake a 3-digit number and check if all digits are distinct.Open example →py# Take 3-digit number num = int(input("Enter a 3-digit number: ")) # Extract digits
- 02Check Middle DigitIntermediateTake a 3-digit number and determine if the middle digit is the largest, smallest, or neither.Open example →py# Take 3-digit number num = int(input("Enter a 3-digit number: ")) # Extract digits
- 03Check First and Last Digits EqualIntermediateTake a 4-digit number and check if the first and last digits are equal.Open example →py# Take 4-digit number num = int(input("Enter a 4-digit number: ")) # Extract first and last digits
- 04Check Digit Count TypeIntermediateCheck whether a given integer is single-digit, double-digit, or multi-digit.Open example →py# Take number num = abs(int(input("Enter a number: "))) # Check digit count
- 05Multiple of 7 or Ends with 7IntermediateCheck if a number is a multiple of 7 or ends with 7.Open example →py# Take number num = int(input("Enter a number: ")) # Check conditions
- 06Determine QuadrantIntermediateTake coordinates (x, y) and determine which quadrant the point lies in.Open example →py# Take coordinates x = float(input("Enter x coordinate: ")) y = float(input("Enter y coordinate: "))
- 07Currency Division CheckIntermediateCheck if an amount can be evenly divided into 2000, 500, and 100 currency notes.Open example →py# Take amount amount = int(input("Enter amount: ")) # Check if divisible by all denominations
- 08Check if Number in RangeIntermediateCheck if a number lies within the range [100, 999].Open example →py# Take number num = int(input("Enter a number: ")) # Check range
- 09Calculate Third AngleIntermediateTake two angles of a triangle and compute the third angle.Open example →py# Take two angles angle1 = float(input("Enter first angle: ")) angle2 = float(input("Enter second angle: "))
- 10Check Perfect SquareIntermediateCheck whether a number is a perfect square (without using the square root function).Open example →py# Take number num = int(input("Enter a number: ")) # Check if perfect square