Step 3: Numbers


Integers

Remember when we said that computer programs are instructions to manipulate and move data? Let’s learn about the most basic type of data used by computers: the integer. Integers are positive and negative whole numbers just like you learned about in elementary school.

1
2
1567890
-200
0

Floats

When computers are performing calculations, they often need to use decimal places - not just whole numbers. In Ruby, numbers with decimal places are called floats (don’t worry about where the name float comes from, it will make sense later).

1.5
3.14159
-0.66
2.71828