Python · Beginner level

Beginner level · Module 1 of 5 · 8 guided hours

Python Setup and First Programs

Set up a working Python environment and write first scripts that read input, store values in variables and print clear results.

Learning objectives

  • Install Python 3 and a code editor and run a script two ways
  • Use variables and the core data types str, int, float and bool
  • Read keyboard input and convert it to numbers safely

Topics

  • Python interpreter and editor (VS Code or Thonny)
  • Variables and data types
  • input(), print() and f-strings
  • Reading error messages

Lessons

  1. Lesson 1 Installing Python and a Code Editor

    Install Python 3 and either VS Code (with the Python extension) or Thonny for low-specification computers, then run a first script.

    interpreterscript fileterminalPATH

  2. Lesson 2 Variables, Data Types and Input/Output

    Store values in variables, recognise the basic data types and build readable output with f-strings.

    variablestr/int/float/booltype()f-string

  3. Lesson 3 Running Scripts and Reading Error Messages

    Understand syntax errors and tracebacks so that mistakes become quick fixes instead of dead ends.

    SyntaxErrorNameErrorTypeErrortraceback

Practical activity

Build a 'mobile airtime calculator' script: the user enters a bundle price and how many bundles they buy per week; the script prints the weekly and monthly cost in SSP with clear formatting.

Expected outcomes

  • A running script that accepts input and prints formatted results
  • Confidence reading and fixing common error messages

Assessment

Instructor checks the running airtime calculator and a short oral question on variables and data types.

Free taster lesson Python Syntax & Setup Read a free self-study lesson on this topic in the Free Course Library.

Taught live by an instructor — online or in person. Free course lessons are for self-study and do not lead to a certificate — see registration options.