Rullst AcademyRullst Academy/Lesson
Python: from first line to project · Lesson 01 / 12

Your first Python file

An idea becomes a file, and an interpreter turns its instructions into actions. Let us prepare a small workbench for the next missions.

Learning paths12 min

Let's discover together

  1. 1

    Python is a language; we use the Python 3 family here. The editor writes text in lesson.py. The interpreter reads that file and runs its instructions. The terminal shows the output.

  2. 2

    Choose your system in the guide below. On Windows, check python --version; on macOS/Ubuntu, python3 --version. If Python is missing, use the official sources in the guide. This course needs no extra packages.

  3. 3

    Create a study folder and save print(2 + 3) in lesson.py as plain text. Open a terminal in that folder: python lesson.py on Windows, or python3 lesson.py on macOS/Ubuntu. The expected output is 5.

  4. 4

    If >>> appears, you are in Python interactive mode: use exit() before the terminal command. Also check that the file has not become lesson.py.txt. On a phone you can read and predict here; this guide uses a computer for execution practice.

FROM LESSON TO PRACTICE

A guide to follow at your pace

Read the steps before using the reference below. Commands run in the indicated system’s terminal; signup happens on the official site. Rullst Academy exercises are practice and do not verify your installation or external account.

print(2 + 3)

Official links and next step

✦
YOUR MISSION

Distinguish editor, file, interpreter and output; save and run a small program.

Now it's your turn

Discovery workshop

Read, predict, check

Compare the two versions. Show result reveals a prepared output: this panel does not run Python. Then practise with the activity file.
Mini experiment

Learning simulation: compare cards and check your predictions. The browser is not compiling Rust or starting a server.

print(2 + 3)
Build your answers and check when you are ready.
A moment to understand

Does editing a file immediately change the result of an earlier run?

I need a hint

Saving a file and running a program are different steps.

Loading your journey…

Take it with you

Run version 1. Replace + with *, save and run again. Record command, prediction and result in a notebook; do not paste passwords or personal paths.

PYTHON · .py

Your Python workbench

Here you read and predict prepared outputs. To run the actual code, download the activity file, edit it on your computer and use Python. Rullst Academy grades lesson answers; it does not verify local execution.

Prepare my computer

Windows

Check python --version. If Python is missing, install Python Install Manager from the official site or Microsoft Store following the linked guide. Reopen the terminal and check the version. An earlier installation may use py; use the command that works on your computer.

Open the preparation course
macOS

Check python3 --version. If needed, use the current Python 3 installer from python.org and follow the official macOS guide. Reopen Terminal and check again. Do not replace system tools for this activity.

Open the preparation course
Ubuntu

Check python3 --version. If components are needed, on a supported Ubuntu release use sudo apt update followed by sudo apt install python3-full. Do not remove system Python. This course uses only the standard library, without pip.

Open the preparation course

Save and run

Extract the activity ZIP into its own folder. Open a terminal there and use your system’s command. If downloading your edited file separately, use its actual name in the command. Save before running again.

Windows
python lesson.py
macOS / Ubuntu
python3 lesson.py
My files and GitHub

The editor keeps a local draft and can send a .py file to GitHub with your confirmation. Download your edited code to preserve it. The ZIP is starter material; for the final project, also publish data and test files following PUBLISH.md.

At your own pace

My files and GitHub

Every lesson can become your own record: code, notes or a practice plan. Saving a file to GitHub is optional and does not change your XP.

Student guide

The editor and downloads open when this lesson is available to your account. Check access below or return to the track map.

Checking your access to this lesson…

Rullstpetbot

AI can make mistakes. Check the lesson material.