Created
July 17, 2013 15:22
-
-
Save kristofer/6021595 to your computer and use it in GitHub Desktop.
A simple float versus integer example.
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
# python math | |
# at a terminal prompt, type: python pythonmath.py | |
# on either the Pi or a Mac. | |
print "Integer: 9 / 5 is", 9 / 5 | |
print "Float: 9.0 / 5.0 is", 9.0 / 5.0 | |
print "Integer: 2 / 3 is", 2 / 3 | |
print "Float: 2.0 / 3.0 is", 2.0 / 3.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment