Use consistent example for demonstrating integer vs. float division

This commit is contained in:
Brian Rue 2013-06-28 15:55:23 -07:00 committed by Brian Rue
parent 6f255a5e62
commit cf98f74d61

View File

@ -36,7 +36,7 @@ to Python 2.x. Look for another tour of Python 3 soon!
# To fix division we need to learn about floats. # To fix division we need to learn about floats.
2.0 # This is a float 2.0 # This is a float
5.0 / 2.0 #=> 2.5 ahhh...much better 11.0 / 4.0 #=> 2.75 ahhh...much better
# Enforce precedence with parentheses # Enforce precedence with parentheses
(1 + 3) * 2 #=> 8 (1 + 3) * 2 #=> 8