Ask your own question, for FREE!
Computer Science 22 Online
OpenStudy (anonymous):

Please explain the float data type in Python

OpenStudy (anonymous):

well they are the real value. Python its an interprated lenguage and i found while searching in google, that they floating points use the double class of C ( wich its 64 bit representation of a flotating point) for more info aboit it u can found here http://en.wikipedia.org/wiki/Floating_point.

OpenStudy (anonymous):

Floating points are decimals, period. Integers are round numbers.

OpenStudy (rsmith6559):

Floating point numbers are decimal numbers (with fractional part) that are stored internally in a binary version of scientific notation. Integers cannot have a fractional part, and are stored in a sequence (usually the word size of the computer) of bytes. If a number with a fractional part is forced into an integer, the fractional part will be truncated. Although floats can hold various numbers, they can't precisely hold many numbers. This can give some really flaky results for comparisons, and even for unformatted printing.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!