python · level 1 · unit 2 · lesson 2
- meet it
- guess first
- your turn
- fix it
- nailed it
Tap a green word if you get lost.
meet it
Put something new in a box and the old thing is gone.
A box holds one value at a time. Store a new value and you the old one, like wiping a whiteboard and writing something fresh.
You can copy a value from one box into another. order = drink puts a copy of what is in drink into order. After that, the two boxes are separate.
The + sign can two strings into one: "pop" + "corn" makes "popcorn". It adds no space, so put one inside the quotes if you need it.
mood = "sleepy"
mood = "happy"
print("I feel " + mood) Look closely: the space after feel sits inside the quotes.
guess first
The drink changes. What does the order say?
Guess before you run it. Wrong guesses are how you learn, and nothing is marked.
drink = "tea"
order = drink
drink = "coffee"
print(order)
your turn
Your turn. Change the weather.
Overwrite the weather box with any weather you like for tomorrow. Type it between the quotes on line 3, then press run.
fix it
The dog's name is squashed. Can you fix it?
- Run it and look closely after the comma. What is missing?
+joins strings exactly as they are. It never adds a space for you.- Put a space after the comma, inside the quotes, then press run.
nailed it
your boxes can change their minds. :D
- Storing a new value overwrites the old one.
order = drinkcopies the value, not the box.+joins strings with no space added.
new words in your collection
- overwrite
- join
This lesson isn’t saved. A free account remembers every lesson you finish.