50 Python Loop Practice Questions
1. Print numbers from 1 to 10 using a loop.
2. Print numbers from 10 to 1 in reverse order.
3. Print all even numbers between 1 and 50.
4. Print all odd numbers between 1 and 50.
5. Print multiplication table of a given number.
6. Find the sum of numbers from 1 to n.
7. Find factorial of a number using loop.
8. Count digits in a given number.
9. Reverse a number using loop.
10. Check whether a number is palindrome or not.
11. Print Fibonacci series up to n terms.
12. Find sum of digits of a number.
13. Find largest digit in a number.
14. Count even digits in a number.
15. Check whether a number is prime.
16. Print all prime numbers between 1 and 100.
17. Print square of numbers from 1 to 20.
18. Print cube of numbers from 1 to 10.
19. Calculate product of numbers from 1 to n.
20. Print numbers divisible by 3 between 1 and 100.
21. Print numbers divisible by both 3 and 5.
22. Generate triangular numbers up to n terms.
23. Print star pattern increasing (*).
24. Print star pattern decreasing (*).
25. Print number pattern 1, 12, 123, ...
26. Print reverse number pattern.
27. Calculate average of n input numbers.
28. Keep taking input until user enters 0.
29. Find smallest number among n inputs.
30. Find largest number among n inputs.
31. Count positive and negative numbers entered by user.
32. Print ASCII values of characters a to z.
33. Check Armstrong number using loop.
34. Print all Armstrong numbers between 1 and 500.
35. Find GCD of two numbers using loop.
36. Find LCM of two numbers using loop.
37. Check perfect number.
38. Print all factors of a number.
39. Count total factors of a number.
40. Print multiplication tables from 1 to 10.
41. Create a simple number guessing game using loop.
42. Print pattern of alternating 1 and 0.
43. Find sum of even numbers from 1 to n.
44. Find sum of odd numbers from 1 to n.
45. Print reverse Fibonacci series.
46. Calculate power of a number without using ** operator.
47. Print Pascal triangle (basic version).
48. Simulate ATM menu using loop.
49. Create menu-driven calculator using loop.
50. Print pyramid star pattern.