I'm learning via Learn Python The Hard Way and I've come across:
Notice the math seems “wrong”? There are no fractions, only whole numbers. Find out why by researching
what a “floating point” number is.
round(3 + 3, 2)
For floating point numbers you write a period after the number, and a zero (if it's a whole number).
1.0 <---- Floating point.
1 <------- integer
That is how python interprets them.
if my_answer != your_question: print "I did not understand your question. Please rephrase it." else: print "Good luck. Python is fun."
I agree with rohit, the 0 is not needed. Although it makes things easier for beginners.