+ 2
Hi guys! im new here whats the meaning of FLOATS
10 Réponses
+ 4
Floats are floating point numbers (fractions)
e.g. 3.53
Their size is 4 bytes, just like integers.
postfix "f" is also usually used to define float.
+ 2
Mbome Lolita Careful, "float" and "decimal" are similar, but in programming they mean two different things. The difference has to do with how the computer stores the number in binary.
If you're new you probably don't need to worry about it, just call them "float" and you're fine. Python does have proper decimal numbers but you probably won't encounter them a lot.
+ 2
A float is a fractional number, all the result of your mathematical operation, it would be a fractional number, the floats are also in negative numbers, if you are a mathematician and you are here, it is very important to know, but in reality they do not interest me much 😅 😅, you can round the fractional number with the round () function, the first argument is the number you want to round, the second is up to the number you want to round, if you only put one number, it returns the whole number, for example:
print (round (80.1537))
Output:
80
I hope you have understood and learned, good luck with everything and any questions or things that you do not understand, you can ask.
Blessings 👍
+ 1
Mbome Lolita, yeah, why not?
+ 1
No problem 👍
And happy learning!
+ 1
Doubles are another type of decimal.
+ 1
Doubt clear :-
➡ Float means point value.
Example :-
~~~~~~
2.3 , 3.4 , 0.5 and so one.
0
Thank you. But can i also say they are decimals?
0
Aleksei Thank you ...
0
Float simply means decimal number
For example 10.0 is a float, that is a number with decimal point is called Float in python