──────────────────────────────────────

1. Broadcast from Base Camp · Send Your First Signal

Run a Python file, predict the order of two lines, and change its message.

Lesson files · lessons/first-programs/first-print

Before you start
Start here with no coding experience.

By the end
- Use print() and matching quotes to show text.
- Predict the order of two lines, then run the program to check your prediction.

Where you can use it
Put a welcome message at the start of a game. Print the rules on the next line so the player reads them in order.

Read the program from top to bottom. Each print() call sends one line to the console, where the program shows its output. The matching quotes around "Base camp online." mark the start and end of the text.

Predict which line will appear first, then press Run. For local practice, save the code as main.py and run python3 main.py in a terminal.

Predict
What will appear on the first line?
- Base camp online.
- Send a reply.

Worked example (example.py)

print("Base camp online.")
print("Send a reply.")


Example result
Base camp online.
Send a reply.

Change the first line of output to Signal received! and the second to Mission ready. Keep the punctuation so Check can match both lines.

Starter program (starter.py)

print("Base camp online.")
print("Send a reply.")


Hint
Change the text inside each pair of quotes. Run before and after the edit so you can see which line changed.

Case 1. Try the sample
Input
(No input.)
Expected output
Signal received!
Mission ready.

Stretch
Make a three-line broadcast for a mission you invent and write down its expected output.

Reflect
Which characters tell Python that Base camp online. is text?

Check your prediction
Base camp online. Python runs these two instructions in the order you wrote them.
