Recap of Floating Point Numbers

What We’ve Covered So Far

Floating point number variables (also called floats) are used when you need a number with a decimal point in it.

Declaring a float variable:

Changing a float variable:

Declaring and assigning a float variable at the same time:

Doing math with a float variable is just like doing regular math with a variable in Algebra. Sometimes float variables create what a rounding error, so use integers whenever you can.  

Next Step:

You will often need to work with more than numbers. Sometimes you need to write text. For that, you will need to learn about characters:

Next Lesson – Characters