Day 3: Loops & Conditionals – Coding Problems

🧠 Problem 1: Odd or Even Number

Write a Python program that takes an integer input and checks whether it is odd or even.

Input: 7  
Output: Odd
    

🧠 Problem 2: Find the Largest of Three Numbers

Take 3 integer inputs from the user and determine which one is the largest using if-elif-else.

Input: 10, 25, 5  
Output: 25 is the largest
    

🧠 Problem 3: Print Prime Numbers from 1 to 100

Use a loop and conditional logic to print all the prime numbers from 1 to 100.

Output: 2, 3, 5, 7, 11, ..., 97
    

🧠 Problem 4: Sum of Digits

Take a number as input and return the sum of all its digits using a loop.

Input: 1234  
Output: 10
    

🧠 Problem 5: FizzBuzz

Print numbers from 1 to 50. For multiples of 3, print "Fizz", for multiples of 5 print "Buzz", and for both, print "FizzBuzz".

Output:
1  
2  
Fizz  
4  
Buzz  
Fizz  
...
FizzBuzz