SYED Mohammed Tayeeb
last year
Syedcountry asked

What does Floating-Point Numbers mean?

Abhay Jajodia
Expert
last year
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.14

  • 0.5

  • -2.75

In Python:

  • 10 is an integer (whole number)

  • 10.0 is 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.