Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def is_divisible(x, y):
- if x % y == 0:
- return True
- else:
- return False
- def is_power(a, b):
- if is_divisible(a,b):
- print(b / a)
- is_power(a / b, a)
- else:
- print(a == 1)
- return a == 1
- print(is_power(2,1))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement