Python from Scratch
A complete Python course, from your very first line of code, through everything the GCSE boards examine in programming, to A Level recursion, data structures, algorithms, the theory of computation, how processors, operating systems and networks work, databases and the programming project, then advanced Python, simulation and machine learning, desktop applications with tkinter and games with pygame. Nearly every example runs in your browser, and every topic has a quiz and written questions.
Your route to Fluency
Revision works when it has an order. Follow these stages rather than opening topics at random.
Type it out, do not copy and paste
Typing code out is slow and that is exactly the point. You notice the colons, the indentation and the brackets, and your fingers learn the patterns. Copying teaches you nothing.
Break it deliberately
Once an example works, change something and predict what will happen before you run it. Being wrong is the fastest way to find out what you actually understood.
Build something you want to exist
A quiz about your favourite subject, a tool that does your maths homework, a game you would actually play. Motivation matters far more than the size of the project.
Learn to read errors, not fear them
Read the last line first, then the line number. Nine errors in ten are a missing bracket, a wrong type or a name spelled differently from where you defined it.
Get through OOP properly
Classes are the boundary between writing scripts and writing programs. Give this section the time it needs, because everything at A Level and beyond assumes it.
Finish something
A small finished project teaches you more than five abandoned big ones, because the last ten per cent is where all the real problems live.
Foundations
Output, variables, types, input, operators and making decisions. The bit everything else is built on.
Core Programming
Repetition, text handling, lists and your own functions. After this unit you can write real programs.
Real Programs
Dictionaries for structured data, files so your program remembers things, and error handling so it does not crash.
GCSE Computer Science in Python
Everything the three GCSE boards examine in programming, written in Python: exam pseudocode translated, arrays, records and files, subprograms, validation and testing, SQL, searching and sorting, and tracing and debugging.
Object Oriented Programming
Classes, objects, encapsulation, inheritance and polymorphism. The step from scripts to software.
A Level: Programming Techniques
Recursion and the call stack, the functional paradigm with map, filter and reduce, and object oriented design with composition, abstract classes and UML.
A Level: Data Structures
Stacks and queues built from arrays and pointers, linked lists, hash tables, binary trees and graphs, each with its traversals and its cost, then heaps, tries and disjoint sets.
A Level: Algorithms and Complexity
Big-O notation and what makes a problem tractable, the four sorting algorithms compared with counters, the shortest path algorithms, Dijkstra's and A star, and the greedy and dynamic programming strategies.
A Level: Data and Databases
Two's complement, bitwise operations and floating point, then relational databases: normalisation, SQL with joins and grouping, and transactions.
A Level: Theory of Computation
Finite state machines and regular expressions, Backus-Naur form with a small compiler built stage by stage, and Turing machines with the limits of what any computer can do.
A Level: Machines, Systems and Security
A working processor with its registers and fetch-decode-execute loop, how an operating system schedules programs and what goes wrong when they share data, compression, encryption and hashing written from scratch, and networks and the web from packets up to a web server.
A Level: Testing and the Project
The levels and kinds of testing, unit tests and test driven development, and how to plan, build, test and evaluate the programming project.
Advanced Python
How Python really works and how professionals use it: names, objects and memory, generators, closures and decorators, special methods, dataclasses and type hints, exceptions and logging, the standard library, and the habits of version control, testing and profiling.
Modelling and Machine Learning
Simulation with random numbers, Monte Carlo sampling, epidemics, cellular automata and queues, then machine learning written with no libraries: nearest neighbours, gradient descent, a perceptron and a small neural network.
Applications and Games
Desktop programs with tkinter and games with pygame, each ending in a complete working project.