Advertisement
Guest User

Untitled

a guest
Dec 7th, 2019
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. def is_divisible(a, b):
  2. if a % b == 0:
  3. return True
  4. return False
  5.  
  6.  
  7. def is_power(a, b):
  8. if a == b or a == 1:
  9. return True
  10.  
  11. if b == 1 and a != 1:
  12. return False
  13.  
  14. return is_divisible(a, b) and is_power(a / b, b)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement