Im not clear about floats
a float is just any real number. 1.0, 2.575436789632, -0.333 are examples of floats. like @alCosecant Maths said: floats are just decimals. If you use the / operator, it will return a float. 2/1 == 2.0 to convert any other numerical datatype to a float, use the float method. E.g: x = float(5) x == 5.0
me either man why float when you can sink!
ok a beginner can take it to be like decimals . . .
Floats are not really decimals, we have a completely separate module for that. it is like scientific notation in base 2, more or less
division operation always gives a float
k thanks @amaras
rest or move on or near the surface of a liquid without sinking.
A float is NOT an exact value, there are several errors with that... for instance, there is a smallest float, not a smallest real number
a float means exact value. 10/5=5.0 n 5 is also correct but in any programming once assign as float number must be ending with .0 or some number.
@Naveen no, it doesn't return a decimal, it returns a float. For instance, 0.1 + 0.1 + 0.1 != 0.3 That's not decimal, there is a separate module for that