## Integers

What are integers?

"int" in Python is a data a type that represents integers. In fact, you have already seen it in action! (An "int" is just an abbreviation for an integer, like 0, 1, 2, 5, 129, or -1. An integer is any whole number, positive or negative, but it cannot be a decimal, so 1.5 is not an integer). Like its name implies, an int can store any whole number. Here are some examples:

"int" in Python is a data a type that represents integers. In fact, you have already seen it in action! (An "int" is just an abbreviation for an integer, like 0, 1, 2, 5, 129, or -1. An integer is any whole number, positive or negative, but it cannot be a decimal, so 1.5 is not an integer). Like its name implies, an int can store any whole number. Here are some examples:

But be careful: the minute you add a decimal point, you aren’t using an int anymore. We’ll get to this later, but the variable NOT_AN_INT below is not an int:

**NOTE**: In Python, there is no easy way to tell what type of variable something is, so just by looking at variable names, there is no way to distinguish between what is an int and what is not an int. This is even more reason of a reason why it is so important to give your variables descriptive names.

When would we use an int?

Integers are very very useful in Python, and have many many uses, an important one of which is counting. For example, let’s say you want to write a program to find out how many kids are in a school. You could use an int to represent the number of kids in each class, and add these int values together into a bigger int value to get the total number of kids in the school. This works because with counting, you usually do not need a decimal (What does 31.75 kids mean?). Thus, the int data type is most frequently used to count things and hold numerical values in Python.

Integers are very very useful in Python, and have many many uses, an important one of which is counting. For example, let’s say you want to write a program to find out how many kids are in a school. You could use an int to represent the number of kids in each class, and add these int values together into a bigger int value to get the total number of kids in the school. This works because with counting, you usually do not need a decimal (What does 31.75 kids mean?). Thus, the int data type is most frequently used to count things and hold numerical values in Python.