Conditions and Loop Exercise in Python
🐍 Python Conditions & Loops – 30 Exercises with Solutions ✅ Part A: Conditions (if, elif, else) 1. Positive, Negative, or Zero num = int(input("Enter a number: ")) if num > 0: print("Positive") elif num < 0: print("Negative") else: print("Zero") 2. Even or Odd num = int(input("Enter a number: ")) if num % 2 == 0: print("Even") else: print("Odd") 3. Eligible to Vote age = int(input("Enter age: ")) if age >= 18: print("Eligible to vote") else: print("Not eligible to vote") 4. Largest of Three Numbers a = int(input("Enter first number: ")) b = int(input("Enter second number: ")) c = int(input("Enter third number: ")) if a >= b and a >= c: print("Largest:", a) elif b >= a and b >= c: print("Largest:", b) else: print("Largest:", c) 5. Leap Year year = int...