Introduction to Data Types
While programming, you will be storing and manipulating lots of data. But where does it all go?
Data is stored in something called a variable so that you can use it for something else later. When creating a variable, you give it a name and then tell it what will be stored in it. Like this:
favorite_number = 12
In this case, the variable name is
favorite_number and the data that will be stored in it is
Take note that the variable is always on the left side of the equal sign, and the data to be stored in it is on the right side.
You will encounter several different data types. The 3 most common types are integers, floats, and strings.
Integers are whole numbers like
Floats are decimal point numbers like
Strings are text like
"My favorite number is 12". Note you can use numbers inside strings.
You will use these a lot, so take the time to do the reading below to make sure you are comfortable with them. :)