+ 3

Float

What is the meaning of floats in python

19th Feb 2018, 10:37 AM
Jared momanyi
Jared momanyi - avatar
3 Respostas
19th Feb 2018, 10:48 AM
Frost
Frost - avatar
+ 9
Floats are fractional numbers as like 4.05, 7.23, 1.4,2.00, where as 2 is an Integer Number but I can express it as Float Number by 2.00 In Python numbers are stored as Integer properly but sometimes it's difficult for computer's memory or hard disk to stored Float Numbers. Python uses / (single Slash) for giving result as Float Number,like 20/5=4.0 Python uses // (double Slash) for giving result as Integer,like 20//5= 4
19th Feb 2018, 10:53 AM
📈SmileGoodHope📈
📈SmileGoodHope📈 - avatar
+ 4
It is a number with decimals, whereas an integer is a whole number, no decimals. Double is like float, but with more decimal places for more precision.
19th Feb 2018, 1:03 PM
Jacob Pembleton
Jacob Pembleton - avatar