Skip to content

Instantly share code, notes, and snippets.

@trilliwon
Created August 19, 2019 05:49
Show Gist options
  • Save trilliwon/07a8e6dd3eb84eb3ddcd2936545a0b53 to your computer and use it in GitHub Desktop.
Save trilliwon/07a8e6dd3eb84eb3ddcd2936545a0b53 to your computer and use it in GitHub Desktop.
is Perfect Square In Python3
def isPerfectSquare(x):
sr = math.sqrt(x)
return (sr - math.floor(sr)) == 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment