Question: In python language, write a program that defines three recursive functions. - divRecur(a, b): calculate and return the integer division of a and b, where

In python language, write a program that defines three recursive functions.

- divRecur(a, b): calculate and return the integer division of a and b, where a and b are positive integers.

- modRecur(a, b): calculate and return a mod b, where a and b are positive integers.

- is5sPower(n): test if n is a power of 5, if n is a 5s power, the function returns True, otherwise, returns False.

Your program should meet the following requirements:

- Operators /, // and % cannot be used in the divRecur() and modRecur(). - All the functions should be recursive. The recursive function can only call itself in the function body, No other functions can be called. A user-friendly menu should be provided so that the user can repeatedly run the program.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!