Python Programming Exercises
Python Programming Exercises
Loops
1. Print natural numbers from 1 to a given number using while loop/ for loop.
2. Calculate the sum of all numbers from 1 to a given number
3. Print the multiplication table of a given number.
4. Count the total number of digits in a number.
5. Display numbers from -10 to -1 using for loop/while loop.
6. Determine whether a given number is prime or not.
7. Print all prime numbers within a range
8. Display Fibonacci series up to 10 terms
9. Find the factorial of a given number
10. Reverse an integer number ( eg if input is 4261, then output should be 1624)
Functions