Skip to content
On this page

Variables

INFO

Variables allow us to store values.

String

Strings are anything in quotes, usually letters or words.

python
name = "Steve"
python
city = "Milwaukee"
python
fav_color = "blue"

integer

Integers are numbers without decimals.

python
age = 24
python
number_of_cats = 3
python
num_windows = 4

float

Floats are numbers with decimals.

python
angle = 31.8
python
pi = 3.14159
python
fries_price = 1.99

boolean

Booleans are either True or False.

python
is_raining = True
python
has_license = False
python
did_complete = True