Menu

[solved] – Question 99990

using recursion
After writing your is_power function, include the following test cases in your script to exercise the function and print the results:

print(“is_power(10, 2) returns: “, is_power(10, 2))
print(“is_power(27, 3) returns: “, is_power(27, 3))
print(“is_power(1, 1) returns: “, is_power(1, 1))
print(“is_power(10, 1) returns: “, is_power(10, 1))
print(“is_power(3, 3) returns: “, is_power(3, 3))

You should submit a script file and a plain text output file (.txt) that contains the test output. Multiple file uploads are permitted. Don’t forget to include descriptive comments in your Python code.

Your submission will be assessed using the following Aspects.

Does the submission include the is_divisible function from Section 6.4 of the textbook?
Does the submission implement an is_power function that takes two arguments?
Does the is_power function call is_divisible?
Does the is_power function call itself recursively?

Expert Answer


Answer to using recursion After writing your is_power function, include the following test cases in your script to exercise the function and print the result….

OR


Leave a Reply

Your email address will not be published. Required fields are marked *