Skip to content

Instantly share code, notes, and snippets.

@emerak
Created February 6, 2013 00:47
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 emerak/4719219 to your computer and use it in GitHub Desktop.
Save emerak/4719219 to your computer and use it in GitHub Desktop.
Variables and Types - LearnPython.org
# change this code
mystring = "hello"
myfloat = 10.0
myint = 20
# testing code
if mystring == "hello":
print "String: %s" % mystring
if isinstance(myfloat, float) and myfloat == 10.0:
print "Float: %d" % myfloat
if isinstance(myint, int) and myint == 20:
print "Integer: %d" % myint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment