Programming Foundations for Analytics PF4A · Course resources
Start here

Everything you need for PF4A, in one place

Pocket references, setup instructions, and a practice lab where you can write and run Python straight in your browser. Bookmark this page — it is the quickest way back to any of it.

Python Learning Lab

Work through all eight topics at your own pace, from your first variable to a groupby chart. Every concept comes with something to actually do — a quick check, code to predict, a challenge to write, and a real scenario to solve. Your code runs in the browser, so there is nothing to install.

10 topics 93 activities Runs in your browser Works on your phone
Open the lab →
Pocket references

One-page syntax summaries you can keep open beside your notebook, or print and bring to a practical. Each opens as a PDF.

Topics 1 & 2

Basics & Lists

Variables, the four data types, arithmetic and BODMAS, print() and input(), creating lists, indexing, slicing and list methods.

Open PDF →
Topics 3 & 4

Built-ins & Logic

Functions versus methods, string methods, f-string format specifiers, try/except, comparisons, and/or/not and if/elif/else.

Open PDF →
Topics 5 & 6

Loops & Functions

while and for, range(), enumerate(), nested loops, break and continue, list comprehensions and writing your own functions.

Open PDF →
Topics 7 & 8

Dictionaries, Pandas & Charts

Keys and values, get(), nested dictionaries, read_csv(), loc vs iloc, filtering, groupby(), and the five Matplotlib chart types.

Open PDF →
Setup

Install Anaconda

Anaconda installs Python and Jupyter Lab together. Choose your operating system, keep the default settings, then launch Jupyter Lab from Anaconda Navigator.

Download →
Getting the most out of this module

Three habits that make the difference

  1. Predict before you run. Read the code and say out loud what you think it will print, then run it. When you are wrong, you have found exactly the gap worth closing — that is worth more than ten lines that happened to work.
  2. Read the error, do not fear it. Every Python error tells you two things: the type of problem and the line it happened on. Check those two before changing anything. Most fixes are a missing bracket, a wrong capital letter, or text where a number should be.
  3. Use AI to understand, not to skip. Ask Copilot to explain an error or compare two approaches. Ask it to write your answer and you will pass the practical and fail the test. AI also gets things wrong — always run and check what it gives you.
Andrew Toh Programming Foundations for Analytics Questions? Ask during the practical or post on the module forum.