Section 1 - Instruction

Last time, we looked at the rules for naming variables. Remember, variables are like labeled boxes for storing information.

If we write: player_level = 5

Engagement Message

What value is stored inside the player_level variable?

Section 2 - Instruction

Let's quickly recap a key naming rule: variable names cannot contain spaces.

Engagement Message

So, if you wanted a variable for a user's age, would user age be a valid name in Python? Why or why not?

Section 3 - Instruction

An important thing about variables is that their values can change! You can update the value stored in a variable by assigning a new value to it.

Example:

Engagement Message

What value does the level variable hold after the third line (level = 2) is run?

Section 4 - Instruction

Variables are especially useful when working with numbers because you can perform calculations with them.

Python uses familiar symbols for math: + for addition, - for subtraction, * for multiplication, and / for division.

Sign up
Join the 1M+ learners on CodeSignal
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal