Advertisement
Guest User

Untitled

a guest
Feb 22nd, 2020
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. def islejland(num):
  2. for x in range(1,10):
  3. for y in range(1,10):
  4. while True:
  5. if num == x**y + y**x:
  6.  
  7. return True
  8. continue
  9.  
  10. else:
  11. return False
  12. print(islejland(3))
  13. import math
  14. def isthreemorf(num):
  15. for x in range(1,1000):
  16. if num == math.pow(x, 3) and x == num[:-1]:
  17. return True
  18. continue
  19.  
  20.  
  21.  
  22.  
  23. isthreemorf(4)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement