STEEL & CODE WORKBENCH

Workbench

Lesson on the left. Code on the right. Everything runs in your browser.

WORKBENCH

Placeholder Lesson: Your First Run

Workbench MVP placeholder

Objective

Read a short Python program, change it, and predict what it prints before you run it.

Explanation

A program is a list of instructions, executed top to bottom. print() shows a value on the output panel.

The editor on the right is yours to change. Edit the text, press Run, and read the result in the output panel below it.

If Python finds a problem it stops and reports a traceback. That is information, not failure -- the last line names the kind of error, and the line numbers point at where to look.

Reading a value

This program stores a value in a name called greeting, then prints it. The quotes tell Python the text is a literal, not a name to look up.

greeting = "Hello, Steel & Code!"
print(greeting)

Your turn

Change the message so the program prints your own name. Keep the print() line the way it is, and change only the text on the left of the equals sign.

Optional stretch: add a second line that prints a short message underneath.

greeting = "Hello, Steel & Code!"
print(greeting)
# Change the message above, then press Run.

Python Editor

Python runs entirely in your browser. Nothing is uploaded.

Tab indents; Shift+Tab unindents.

Open Lesson Board

Python is loading...

Starter code is preloaded.

Output

Nothing yet. Press Run to execute the code.