Section 1 - Instruction

Remember that storing information in variables is like putting data into labeled boxes?

For example: score = 100

Engagement Message

Can you tell me what value is stored in score?

Section 2 - Instruction

Now, let's talk about the names we give our variables. Just like you can't label a real box with anything (maybe not symbols or blank spaces), there are rules for naming variables in Python.

Variable names can contain letters (a-z, A-Z), numbers (0-9), and the underscore character (_).

Engagement Message

Make sense so far?

Section 3 - Instruction

However, there's a catch with numbers: a variable name cannot start with a number.

So, player1 is a valid name, but 1st_player is not.

Engagement Message

Do you think we can make a variable named 0_day?

Section 4 - Instruction

Another important rule: variable names cannot contain spaces. If you want to represent a multi-word concept, use underscores (_) instead.

For example, high_score is good, but high score is not.

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