Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from math import sqrt
- def answer(area):
- end_list = []
- def a_function(some_area):
- thing = int(sqrt(some_area)) * int(sqrt(some_area))
- print 'thing is'
- print thing
- #a_square = some_area - thing
- end_list.append(thing)
- #print 'square'
- #print a_square
- def is_square(number):
- if sqrt(number) == int(sqrt(number)):
- return True
- else:
- return False
- if is_square(area):
- end_list.append(area)
- else:
- print end_list
- a_function(area)
- while end_list[-1] != is_square(end_list[-1]):
- a_function(area-sum(end_list))
- return end_list
- area = raw_input('num plz')
- print answer(int(area))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement