Skip to lesson content
navan✳THE BUILD LABPYTHON 3
0/101 complete
BUILD LAB / PYTHON/ Boot sequence
EXPERIMENT 01 / 101

First contact.

Meet Python, set up your workspace, and make a machine say something back.

BY NAVAN SAMI◷ 6 MIN READPYTHON 3

01 The idea

Python turns instructions written in a text file into actions. You write the instructions; the Python interpreter reads and executes them. Start small: one file, one message, one successful run. You do not need a complicated toolchain to begin.

After installing Python 3, run these commands in your terminal. On Windows, use py in place of python3.

Terminal · macOS / Linux
python3 --version
python3 hello.py

02 The experiment

Read it once. Predict what will happen. Then copy it into a .py file and run it in your local Python setup.

first_contact.py
print("Hello, builder.")
print("Small script. Big possibilities.")
↳ EXPECTED OUTPUT
Hello, builder.
Small script. Big possibilities.

03 Under the hood

  1. 1

    Install a supported Python 3 release from python.org and a code editor such as VS Code. Check the installation in your terminal: python3 --version on macOS/Linux or py --version on Windows. Some installations use python instead.

  2. 2

    Create a file named hello.py and paste the example into it. In the terminal, open the folder containing the file. Run python3 hello.py on macOS/Linux or py hello.py on Windows.

  3. 3

    print() is a built-in function. Text inside matching quotes is a string. Each print call writes a new line, so the two messages appear one below the other.

04 Your turn, builder

A SMALL MISSION

Print your name on the first line and one thing you would like to build on the second.

Reveal one possible solution +
one_possible_solution.py
print("Navan")
print("I want to build a tiny game.")

05 Check your signal

QUICK SIGNAL CHECK

What runs the instructions in a .py file?

THAT’S ANOTHER IDEA IN YOUR TOOLKIT.

Experiment. Logged.

When you can explain the idea and make the example your own, mark it complete. Your log stays in this browser.

Keep exploring

Go deeper with the official Python guide ↗.

Built with curiosity. By Navan Sami. ↗Python 3 · Think. Try. Build.