SHARE
TWEET

Untitled

a guest Dec 7th, 2019 104 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top