The document lists Python programming exercises to write functions for various mathematical operations: finding the cube, diameter and area of a circle, maximum/minimum of numbers, checking even/odd, and determining if a number is prime, Armstrong, or perfect. It also includes exercises to find prime numbers in a range, Armstrong numbers in a range, perfect numbers in a range, power of a number, reverse of a number, factorial of a number, nth Fibonacci term, and twin prime numbers up to a range.
The document lists Python programming exercises to write functions for various mathematical operations: finding the cube, diameter and area of a circle, maximum/minimum of numbers, checking even/odd, and determining if a number is prime, Armstrong, or perfect. It also includes exercises to find prime numbers in a range, Armstrong numbers in a range, perfect numbers in a range, power of a number, reverse of a number, factorial of a number, nth Fibonacci term, and twin prime numbers up to a range.
The document lists Python programming exercises to write functions for various mathematical operations: finding the cube, diameter and area of a circle, maximum/minimum of numbers, checking even/odd, and determining if a number is prime, Armstrong, or perfect. It also includes exercises to find prime numbers in a range, Armstrong numbers in a range, perfect numbers in a range, power of a number, reverse of a number, factorial of a number, nth Fibonacci term, and twin prime numbers up to a range.
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. 3. Write a Python program to find maximum and minimum between two numbers using functions. 4. Write a Python program to check whether a number is even or odd using functions. 5. Write a Python program to check whether a number is prime, Armstrong or perfect number using functions. 6. Write a Python program to find all prime numbers between given range using functions. 7. Write a Python program to print all Armstrong numbers between given range using functions. 8. Write a Python program to print all perfect numbers between given range using functions. [ perfect number is a positive integer that is equal to the sum of its positive divisor, excluding the number itself example 6 3+2+1= 6]
9. Write a Python program to find power of any number using function.
10. Write a Python program to find reverse of any number using function. 11. Write a Python program to find factorial of any number using function. 12. Write a Python program to generate nth Fibonacci term using function. 13. Write a python program to find twin prime numbers up to a range. [ex 3,5 5,6 11,13 17,19 41,43 ] all are twin prime their number difference is 1