Card 1: Output

Module 1: The Basics

1 The Hook

Imagine you want to send a Text Message to a friend. You type the message, hit send, and it appears on their screen.

In Python, the print() command is how we send a message to the computer screen. It is like a Megaphone for your code!

2 Worked Example

Read the comments (in grey) to understand what the code does.

print("Game Over") # Show the words "Game Over" on screen
print("Score: 100") # Show the score points

PREDICT

Don't run this code yet! What exactly will appear on the screen?

print("5 + 5")

Hint: Look at the speech marks " ". They turn everything inside into a dumb text message.

Interactive Editor

> _
BRONZE (MODIFY)

🥉 Change the Message

1. Copy the code below.
2. Change "Hello" to your own name.

print("Hello")
> _
SILVER (FIX)

🥈 Broken Code

This programmer made a mistake! They forgot to close the speech marks.
Task: Fix the error so it runs.

> _
GOLD (MAKE)

🥇 The Receipt

Create this receipt design using multiple print statements.
You will need: | (pipe), - (dash), and + (plus).

+------------------+
|  TECH STORE      |
|  Item: Laptop    |
|  Price: $500     |
+------------------+
> _