Rullst AcademyRullst Academy/Lesson
Python on Windows · Lesson 03 / 05

My first .py file

A simple calculation will leave the editor and become terminal output. Make a small change and explain why the result changed.

Learning paths12 min

Let's discover together

  1. 1

    In the editor window, write the example’s two lines. Use File → Save As and save as hello.py inside academy-python. Quotes must be straight, as shown. Check the full filename; do not include >>> or code-block markers.

  2. 2

    In IDLE, Run → Run Module runs the saved file and shows output in Shell. To use the terminal, check the folder and run python hello.py. Keep the terminal open to read the result. You do not need to double-click the file or install it as an application.

  3. 3

    print(2 + 3) calculates before displaying: it prints 5. print("2 + 3") displays the quoted characters: it prints 2 + 3. print does not create another file or save the output into a document.

  4. 4

    Replace 2 with 4 in both lines, predict the output and save again. Run again. If the old result appears, check which file you saved and which path you ran before changing installation.

PYTHON · windows

From the browser to your computer

This page’s predictions use prepared examples. To practise for real, download the activity, extract it into a new folder and follow README.md one step at a time. Rullst Academy does not install or run Python on your computer.

Commands in your system’s terminal

python hello.py

Code to save in the editor

The Python lines below belong in the file. Terminal commands are in the preceding panel. Do not copy >>>, line numbers or Markdown fences.

print(2 + 3)
print("2 + 3")
My files and GitHub

In the first two lessons, the editor keeps .md notes. Afterwards it keeps .py code. Download your edits to take them to another device; the ZIP contains starter material. GitHub publishing is optional and sends one file per operation, without sending your Python environment.

✦
YOUR MISSION

Save hello.py, run it and compare a number with text.

Now it's your turn

Discovery workshop

Prepare, observe and explain

In the first scenario, hello.py has two lines with 2 and 3. In the second, both were edited and saved with 4 and 3. Each scenario runs its own prepared version; the browser does not read your computer’s files.
Mini experiment

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

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

What should you do after editing and before running again?

I need a hint

Compare the tools, the file and the result. You do not need to guess.

Loading your journey…

Take it with you

Make a third version with two numbers you choose. Predict before running and record whether it matched. When downloading your edited code, use the exact saved filename in the command, such as hello.py; this does not ask for your personal name.

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.