Section 1 - Instruction

Last time, we saw how to print multiple things on one line using commas, like:

Engagement Message

What was the exact output of that command?

Section 2 - Instruction

Sometimes, we want to save a piece of information to use later in our program. Think of it like putting something in a labeled box so you can find it easily when you need it.

Engagement Message

Does that idea make sense?

Section 3 - Instruction

In programming, these labeled boxes are called variables. We create a variable and give it a value using the equals sign (=).

For example: message = "Hello again!"

Here, message is the variable name (the label on the box).

Engagement Message

What value did we store inside the message variable?

Section 4 - Instruction

Once you've stored something in a variable, you can use the variable's name wherever you would have used the value itself.

For instance:

Engagement Message

What do you think running these two lines would output?

Section 5 - Instruction

Variables aren't just for text! They can hold numbers too.

The computer remembers that holds the number and uses it in the command.

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