Hi guys! im new here whats the meaning of FLOATS | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Hi guys! im new here whats the meaning of FLOATS

7th Oct 2021, 3:07 PM
Mbome Lolita
Mbome Lolita - avatar
10 Answers
+ 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.
7th Oct 2021, 3:10 PM
Aleksei Radchenkov
Aleksei Radchenkov - avatar
+ 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.
7th Oct 2021, 11:27 PM
Schindlabua
Schindlabua - avatar
+ 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 👍
8th Oct 2021, 8:52 PM
CGO!
CGO! - avatar
+ 1
Mbome Lolita, yeah, why not?
7th Oct 2021, 3:12 PM
Aleksei Radchenkov
Aleksei Radchenkov - avatar
+ 1
No problem 👍 And happy learning!
7th Oct 2021, 3:14 PM
Aleksei Radchenkov
Aleksei Radchenkov - avatar
+ 1
Doubles are another type of decimal.
8th Oct 2021, 9:41 AM
Sonic
Sonic - avatar
+ 1
Doubt clear :- ➡ Float means point value. Example :- ~~~~~~ 2.3 , 3.4 , 0.5 and so one.
9th Oct 2021, 8:44 AM
Tousif HR
0
Thank you. But can i also say they are decimals?
7th Oct 2021, 3:11 PM
Mbome Lolita
Mbome Lolita - avatar
0
Aleksei Thank you ...
7th Oct 2021, 3:13 PM
Mbome Lolita
Mbome Lolita - avatar
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
9th Oct 2021, 9:36 AM
Muhammad Abdulmalik
Muhammad Abdulmalik - avatar