AlgoBazaAlgoBaza
Python for kids ยท Module 1

Lesson 0

Installing Python on your computer

After this lesson: You'll install Python from python.org/downloads and run your first program on your own computer.

Video

?

The video for this lesson is coming soon.

Explanation

Hi! On AlgoBaza you can write programs right in the browser - nothing to install. But real programmers have Python on their own computer. I'll show you how to install it! ๐Ÿ’ป This lesson is optional - you can also go straight to lesson 1.

Ask an adult first

Installing programs is a serious thing. Ask a parent or guardian for permission and help.

Download Python only from the official website: python.org/downloads. Other sites may give you something bad instead of Python.

Python and an editor - what are they?

To write and run programs on a computer, you need two things:

WhatWhat forLike at school
Pythonreads your code and does the instructionsa teacher who reads the task
An editorwhere you write and save the programa notebook

From python.org/downloads you get Python - and the simple IDLE editor is installed together with it. One installation and you have everything!

Installing Python from python.org

  1. Go to the website python.org/downloads.
  2. Click the big yellow Download Python button - the page picks the version for your computer.
  3. Open the downloaded file.
    • Windows: tick Add python.exe to PATH at the bottom and click Install Now.
    • Mac: click Continue, and Install at the end.
  4. Start the IDLE editor, write a program and press F5.

Watch the whole film step by step:

Installing Python ๐ŸŽฌ

๐Ÿ’ป

Click Play and watch the computer screen - or pick a step from the list.

Don't forget PATH!

On Windows the Add python.exe to PATH box is very important - thanks to it the python command works in the terminal. If you forget it, run the installer again and choose Modify.

Linux

On Linux Python is usually already in the system. Check it in the terminal - we'll show you how in a moment. If something looks different from here, ask an adult for help.

Checking that Python works

The terminal is a window where we type instructions for the computer. Type python --version in it and press Enter. If you see Python 3. and some numbers - everything's fine!

And just python starts the chat mode: the >>> sign means Python is waiting for an instruction. You type a line - and get the answer right away.

Talking to Python in the terminal ๐ŸŽฌ

๐Ÿ’ป

Click Play and watch the computer screen - or pick a step from the list.

Mac and Linux: python3

On a Mac and Linux we usually type python3 instead of python, e.g. python3 --version.

Saving a program

We save a program in a file ending in .py - for example greeting.py. That ending tells the computer it's a Python program.

A good file name: small letters, no spaces and no special letters, e.g. my_first.py. In IDLE: File โžก๏ธ Save, then Run โžก๏ธ Run Module (or F5) to run it.

?

Where can you safely download Python?

?

What does the >>> sign mean in the terminal?

?

Which file name is best for a program?

Remember

  • Install programs with an adult's permission - Python only from python.org/downloads.
  • On Windows tick Add python.exe to PATH; you write programs in the IDLE editor.
  • python --version in the terminal checks whether Python is installed.
  • >>> - Python is waiting for an instruction. We save programs in .py files.

Done! You have Python on your computer. ๐ŸŽ‰ You still send the course tasks here, on AlgoBaza - and at home you can practise in IDLE. See you in lesson 1!