← Back to Education
Education digital-technologies year-9

Python Basics: Chapter Hub

The central chapter hub for the Explorer sequence across output, variables, input, logic, loops, lists, functions, and debugging.

Published Updated Type reference-hub

The Explorer sequence teaches Python as one evolving program. Instead of isolated exercises, each chapter upgrades the same project so students can see how concepts connect.

Chapters

How To Use This Hub

  • move in chapter order so each concept builds on prior work
  • keep one working file and improve it chapter by chapter
  • run code frequently and treat errors as information, not failure
🧭 EXPLORER: Python Basics Help Hub
Learn how to code in Python using the chapters below.

This hub supports our ongoing build: EXPLORER: an interactive field log system. Each chapter adds one new skill and upgrades the same program.
✅ Before you ask for help…
  1. Run your code.
  2. Read the error line number (if there is one).
  3. Check brackets, spelling, and indentation.
  4. Explain what you wanted the code to do.
🧠 Beginner Path (EXPLORER build series)
Each chapter upgrades the same program. Keep your file as you go.
1
Understand programs as inputs → processing → outputs and see how Python runs.
2
Build a working “Field Log” screen using print().
3
Store mission details (researcher name, location, day number) and display them.
4
Add numeric data (temp, sample count) + a status flag (safe/unsafe).
5
Collect user observations with input() and convert types correctly.
6
Make decisions based on conditions (and get indentation right).
7
Repeat daily logs and re-ask until input is valid (for/while).
8
Store collected samples and events in lists, then display a summary.
9
Turn repeated code into reusable functions (log day, show status, add sample).
10
Use tracebacks + checklists to find and fix issues in your program.
🧰 Extra help (as we build it)
These sections will grow over time. Use them when you want more practice or faster fixes.
⚠️ Common errors & what they usually mean
SyntaxError: Python can’t understand the code you typed (often brackets/quotes/colon).
NameError: you used a variable name Python doesn’t know (spelling/case or not defined yet).
TypeError: you used the wrong type (e.g., adding text to a number).
ValueError: Python understood the type, but the value doesn’t make sense (e.g., trying to turn “hi” into a number).
IndentationError: the spacing at the start of lines doesn’t match what Python expects.
🎮 Mini Practice Hub (Chapter Challenges)
Try the challenge first. Open the solution only after you’ve attempted it.
Chapter 1 – Inputs → Processing → Outputs
Identify the input, processing, and output:
name = input("Enter your name: ")
greeting = "Welcome " + name
print(greeting)
Show solution Input: input()
Processing: combining text with a variable
Output: print(greeting)
Chapter 2 – print()
Write one line that prints:
Mission started successfully.
Show solution
print("Mission started successfully.")
Chapter 3 – Variables
Fix the bug:
day = 4
print("Day number: " + Day)
Show solution
print("Day number: " + str(day))
Chapter 4 – Data Types
Why does this crash?
temp = "25"
print(temp + 5)
Show solution
temp = int("25")
print(temp + 5)
Chapter 5 – input() & conversion
Fix the input so it can be added numerically:
count = input("Enter sample count: ")
print(count + 1)
Show solution
count = int(input("Enter sample count: "))
print(count + 1)
Chapter 6 – If Statements
Predict the output:
oxygen = 18
if oxygen > 19:
    print("Safe")
else:
    print("Low oxygen")
Show solution It prints: Low oxygen
Chapter 7 – Loops
How many times will this print?
for i in range(3):
    print("Logging...")
Show solution It prints 3 times.
Chapter 8 – Lists
What does this print?
samples = ["rock", "water", "soil"]
print(samples[1])
Show solution It prints: water
Chapter 9 – Functions
What is missing?
def greet(name):
    print("Hello " + name)

_____ ("Ava")
Show solution
greet("Ava")
Chapter 10 – Debugging
What error type will this cause?
print("Day number: " + 5)
Show solution TypeError – cannot add a string and an integer without conversion.