Skip to content

Instantly share code, notes, and snippets.

@kristofer
Created July 17, 2013 15:22
Show Gist options
  • Save kristofer/6021595 to your computer and use it in GitHub Desktop.
Save kristofer/6021595 to your computer and use it in GitHub Desktop.
A simple float versus integer example.
# 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