def is_divisible(a, b): return a % b == 0 def is_power(a, b): if a == 1: return True if b == 1: return False if not is_divisible(a, b): return False return is_power(a/b, b) 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))
Need help with similar assignment? We are available 24×7 to deliver the best services and ready within 3-4 hours?
Order a custom-written, plagiarism-free paper
Get Answer Over WhatsApp
Get Your Custom Answer Now
Do you have an upcoming essay or assignment due?
Your first order with us is FREE!
If yes
Get Your Custom Answer Now