Skip to content

Instantly share code, notes, and snippets.

@ssanin82
Created February 7, 2015 08:06
Show Gist options
  • Save ssanin82/8b47819bb9f219310005 to your computer and use it in GitHub Desktop.
Save ssanin82/8b47819bb9f219310005 to your computer and use it in GitHub Desktop.
def is_square(integer):
root = math.sqrt(integer)
if int(root + 0.5) ** 2 == integer:
return True
else:
return False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment