Created
February 6, 2013 00:47
-
-
Save emerak/4719219 to your computer and use it in GitHub Desktop.
Variables and Types - LearnPython.org
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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