Wrap up

You did it ๐ŸŽ‰

You now know enough Python to start writing useful little programs. Here's a roadmap for what to learn next, and some places to practise.

What to learn next (in roughly this order)

  1. Error handling โ€” try / except blocks for when things go wrong (e.g. user types text instead of a number).
  2. File I/O โ€” reading and writing text files with open().
  3. Modules & import โ€” using Python's standard library (math, datetime, random, json) and splitting your own code into multiple files.
  4. Virtual environments & pip โ€” installing third-party packages from PyPI.
  5. Classes / OOP โ€” defining your own object types with class.
  6. A real-world library โ€” pick one based on what excites you:
    • Data & analysis: pandas, matplotlib
    • Web apps: FastAPI or Flask
    • Automation / scripting: requests, beautifulsoup4
    • Games / graphics: pygame

Free places to practise

Project ideas to lock it in

Theory only sticks once you build something. Try one of these โ€” small enough to finish in an afternoon, but real enough to teach you something:

The single most useful habit Don't read more before you've coded a bit. Pick one tiny project and finish it. You'll learn more from one finished thing than from ten tutorials.

Quick reference

# Variables and types
name = "Sam"; age = 34; pi = 3.14; ok = True

# Input / output
who = input("Name? ")
print(f"Hi {who}")

# Conditionals
if age >= 18:
    print("adult")
else:
    print("minor")

# Loops
for i in range(3):
    print(i)

# List + dict
nums = [1, 2, 3]
person = {"name": "Sam", "age": 34}

# Function
def add(a, b):
    return a + b