Skip to content

Instantly share code, notes, and snippets.

@codecademydev
Created January 20, 2018 12:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codecademydev/7bef01911c8f0e9dc59152f931f4c4ea to your computer and use it in GitHub Desktop.
Save codecademydev/7bef01911c8f0e9dc59152f931f4c4ea to your computer and use it in GitHub Desktop.
Codecademy export
def is_int(x):
absolute = abs(x)
rounded = round(absolute)
return absolute - rounded == 0
print type(-1)
print -1 == int
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment