🎯 What you will learn
- Use print() to show messages
- Put text in quotes
- Run code and read the output
👋 Let’s get started!
Python is a coding language used by game makers, scientists and robots 🤖. The first spell every coder learns is print(). Let’s cast it!
🪜 Step by step
1. 🖨️ print shows things
Whatever is inside print( ) shows up in the output.
print("Hello, world!")
2. 💬 Text needs quotes
Text (called a string) goes inside quotes. Numbers don’t need quotes.
print("I am 8 years old")
print(8)
3. 📜 Many lines
Python runs lines from top to bottom, one after another.
print("Ready...")
print("Set...")
print("GO! 🚀")
🧪 Try it!
Change the code and press ▶ Run to see what happens. You can’t break anything!
Countdown rocket
print("3")
print("2")
print("1")
print("Blast off! 🚀")Make a sandwich program
print("Get bread 🍞")
print("Add peanut butter 🥜")
print("Add jelly 🍇")
print("Eat! 😋")📖 Key words
Tap a card to flip it over!
- print()
- Shows something in the output 🖨️
- String
- Text inside quotes 💬
- Output
- What the program shows 🖥️
🏆 Challenge
Make Python print these two lines exactly:
Challenge
print("I am a coder")
Knowledge Check Quiz
- What will this print?
- Which line has a bug?
- In what order does Python run lines?