← Python from Scratch
Lesson 6 of 78 · 5 XP
Warm-up: a variable is a box warm-up
Theory and problem statement
Machine translation, not yet reviewed by a native speaker.
A variable is a box with a name. We put a value into it with = and can take it out as many times as we like:
name = input() # put what was typed into the box called name
print(name) # took it out
print(name) # and once more
Task. Read a word into a variable and print it twice, each time on a new line.
Sign up for free to solve this task right in your browser: code editor, running, test checks and hints.