List of function and recursion programming exercises
List of function and recursion programming exercises
programming exercises
m
co
1. Write a python program to find cube of any number using function.
2. Write a python program to find diameter, circumference and area of circle using functions.
a.
ity
3. Write a python program to find maximum and minimum between two numbers using
functions.
ad
4. Write a python program to check whether a number is even or odd using functions.
ne
5. Write a python program to check whether a number is prime, Armstrong or perfect number
using-functions
zo
6. Write a python program to find all prime numbers between given interval using functions.
y
7. Write a python program to print all strong numbers between given interval using functions.
ud
8. Write a python program to print all Armstrong numbers between given interval using
functions.
t
.s
9. Write a python program to print all perfect numbers between given interval using
functions.
w
10. Write a python program to find power of any number using recursion.
w
w
11. Write a python program to print all natural numbers between 1 to n using recursion.
12. Write a python program to print all even or odd numbers in given range using recursion.
13. Write a python program to find sum of all natural numbers between 1 to n using recursion.
14. Write a python program to find sum of all even or odd numbers in given range using
recursion.
15. Write a python program to find reverse of any number using recursion.
16. Write a python program to check whether a number is palindrome or not using recursion.
m
17. Write a python program to find sum of digits of a given number using recursion.
co
18. Write a python program to find factorial of any number using recursion.
a.
19. Write a python program to generate nth Fibonacci term using recursion.
ity
20. Write a python program to find GCD (HCF) of two numbers using recursion.
ad
21. Write a python to find LCM of two numbers using recursion.
22. Write a python program to display all array elements using recursion.
ne
23. Write a python program to find sum of elements of array using recursion.
zo
24. Write a python program to find maximum and minimum elements in array using recursion.
y
t ud
.s
w
w
w