+ 1
How to use float?
6 Answers
+ 2
Hej, Jeorge Rey Antipaso !
Floats are representing floating point numbers in Python. You are using them as ordinary numbers, when ever you need to represent numbers as a fractions of integers, like the result of two divided numbers.
You can use the function float() to convert from other data types to floats, like from strings or from integers.
What can be confusing when using floats is that the decimal numbers representing on the screen only are aproximations of the hardware base 2 fractions the computer handle, which in turn, you have to learn to handle.
Read more at for examples:
https://docs.python.org/3/tutorial/floatingpoint.html
+ 1
Thanks đ
+ 1
In Python âx = float()â but remember that divisions always evaluate to floating point number/s.