python · level 1 · unit 1 · lesson 2
- meet it
- guess first
- your turn
- fix it
- nailed it
Tap a green word if you get lost.
meet it
shows a message on the screen.
print is a command that shows something on the screen. Whatever you put inside its brackets is what appears.
Words go inside quote marks, like "Hello, world!". A piece of text in quotes is called a . Picture the letters threaded on a string, like beads.
The quotes tell Python where your text starts and stops. They are not shown on the screen.
print("Hello, world!") Use the same quote mark at both ends of your string.
guess first
What will appear on the screen?
Guess before you run it. Wrong guesses are how you learn, and nothing is marked.
print("My cat is called Pickles")
your turn
Your turn. Tell the computer what you love to eat.
Type your favourite food in place of the blank, keeping it inside the quotes. Then press run.
fix it
This line will not run. Can you fix it?
- Look at what comes straight after the word
print. printneeds brackets to hold the string it shows. Are there any?- Put ( after print and ) at the very end of the line, then press run.
nailed it
you made the computer talk. :D
printshows whatever is inside its brackets.- Text inside quote marks is called a string.
- The quotes are not shown on the screen.
new words in your collection
- string
This lesson isn’t saved. A free account remembers every lesson you finish.