how can i calculate float value?
eg it is 32/10 3.2 in calculator
in python 32/10 is 3.0
help me out
dineshswamy
0
Light Poster
Recommended Answers
Jump to Postfrom __future__ import division print 32/10 """ My output: 3.2 """
Basically, the from __future__ import division, will convert the / operator into the floor division operator, which will do the exact division.
Note that if you do such thing, the / operator which was before, meaning …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.