Questions are based on For and While Loops :
Sum of Even Numbers
Write a Python program to calculate the sum of all even numbers between 1 and 100 using afor
loop.Simple Number Guessing Game
Create a number guessing game where the user has to guess a number between 1 and 10. Use awhile
loop to give the user multiple attempts, and provide hints if the guess is too high or too low.Count Vowels in a String
Write a program that takes a string input from the user and counts the number of vowels in the string using afor
loop and anif
statement.Print a Multiplication Table
Write a Python program that prints the multiplication table of a given number (up to 10). Use afor
loop to display the table.Check for Prime Number
Write a Python program to check if a given number is prime or not using afor
loop and conditional statements.Find the Factorial of a Number
Write a Python program to find the factorial of a number using awhile
loop. Make sure to validate the input and handle negative numbers appropriately.FizzBuzz
Implement the classic FizzBuzz problem using afor
loop. Print numbers from 1 to 50, but for multiples of 3 print "Fizz" instead of the number, and for multiples of 5 print "Buzz". For numbers that are multiples of both 3 and 5, print "FizzBuzz".Sum of Digits in a Number
Write a Python program to find the sum of digits of a number using awhile
loop and conditional statements.Palindrome Check
Write a Python program that checks whether a given string is a palindrome or not using awhile
loop and conditional statements.Calculate the GCD of Two Numbers
Write a program to calculate the Greatest Common Divisor (GCD) of two numbers using awhile
loop and the Euclidean algorithm.Find Armstrong Numbers
Write a Python program to find all Armstrong numbers between 100 and 1000 using afor
loop and conditional statements. An Armstrong number is one that equals the sum of its digits each raised to the power of the number of digits.Generate Fibonacci Sequence
Write a Python program to generate the firstn
terms of the Fibonacci sequence using awhile
loop. Ensure thatn
is provided by the user.Calculate Exponent Without Using the
**
Operator
Write a Python program that calculates the value ofx
raised to the powery
using afor
loop and multiplication (without using the**
operator).