##### Reference no: EM131260687

Python

1. If m and n are integers, define a function sum (m, n) is the sum of all integers in the interval (m.n), which is 0 if the interval is empty.

2. If m and n are integers, define a function product (m, n) is the product of all integers in theinterval (m, n), which is 1 if the interval is empty.

3. If m, n and k are integers, define a function hasDivisors (k, m, n) that checks if and only if k has atleast one divisor in the interval (m, n).

4. If m is an integer, define a function isPrime (m) that checks if m is prime number.

5. If m is an integer, define a function isPerfect (m) that checks if m is perfect number.

6. If m is an integer, define a function sumUpTo (m) is the sum of integers in (0, m).

7. If m is an integer which is not zero, define a function greatestDivisor (m) that returns thegreatest divisor of m.

8. If m and n are integers which are not both zero, define a function gcd (m, n) that returns thegreatest common divisor of m and n.

9. If k, m, and n are integers, define a function numDivs (k, m, n) that returns the number ofdivisors of k in the interval (m, n).

10. If m is an integer, define a function productPrimes (m, n) that return the product of the primenumbers in the interval (m, n).