Your first program · About 5 minutes

Hello, little universe!

The big little idea

A program is a set of instructions a computer can follow. Python reads these instructions from top to bottom. The print() function puts a message in the output.

print("Hello, universe!")
print("I made this with code.")

Words inside quotation marks are called a string. Keep the opening and closing quotes around your message, and put it inside the parentheses.

Predict, then try: read the example from top to bottom. What do you think it will print? Copy it into the editor below to test your prediction.

Your turn, code explorer.

Make your program print Hello, Bit! on one line and Let’s build! on the next. Use a straight apostrophe in Let's.

Hello, Bit!
Let's build!
my_adventure.pyPython · in your browser

Edit the code. Then run it. Ctrl / ⌘ + Enter also works.

OutputYOUR IDEAS, ALIVE
Your program’s output will appear here.

Ready when you are. ✦

The first run loads Python. This can take a moment.

Program input For programs that use input()

Add answers before you run. Each input() reads the next line. Use made-up names and details.

Real Python, powered by Pyodide. Standard-library programs work here; desktop windows, turtle graphics, and package installation are not supported by this editor. Programs stop after 10 seconds of execution.

Back to the starting code?

This replaces your edits for this activity. Download your code first if you want to keep it.

A little hint, please

Use two print() instructions. You can put an apostrophe inside a string wrapped in double quotes.

Show one possible solution

There can be more than one way. Read this version, then try writing it yourself.

print("Hello, Bit!")
print("Let's build!")
Pack this idea for later: print() turns your words into output. The computer follows the order you write.