Syed
asked

Expert
Abhay Jajodia answered
Hi YED Mohammed Tayeeb,
A floating-point number, or float, is simply a number that has a decimal point.
Examples of floats:
3.140.5-2.75
In Python:
10is an integer (whole number)10.0is a float (decimal number)
We use floats when we need to work with values that are not whole numbers, like height, weight, temperature, or averages.
One small note: floats can sometimes show tiny rounding differences because computers store decimals in an approximate way. For example, you might see something like 0.30000000000000004 when you expect 0.3. That is normal with floats.
If you have more questions, I am here to help 😊
Python
This question was asked as part of the Getting started with Python course.
Our Experts
Sudip BhandariHead of Growth/Marketing
Apekchhya ShresthaSenior Product Manager
Kelish RaiTechnical Content Writer
Abhilekh GautamSystem Engineer
Palistha SinghTechnical Content Writer
Sarthak BaralSenior Content Editor
Saujanya Poudel
Abhay Jajodia
Nisha SharmaTechnical Content Writer
Udayan ShakyaTechnical Content Writer