Skip to content

Videos

Python for A-Level CS

Pick a topic to watch.

15 video lessons

2:07 Lesson 1 Nested loops One loop inside another sounds simple, and one sentence about it gets misread every year: for every single pass of the outer loop, the inner loop runs all… 2:02 Lesson 2 Text files Opening a file takes a mode, and the mode is not a formality. Read gives you what is there. Write throws away what was there and starts a fresh file. Append… 2:06 Lesson 3 Exceptions Ask Python to turn the word hello into a number and it raises an exception — a value error. And an exception that nobody handles stops the program on the spot… 2:10 Lesson 4 Stacks A stack is the first abstract data type in this course, and the word abstract is doing real work. What defines a stack is its operations: push, pop, peek… 2:03 Lesson 5 Queues A queue is the other ADT, and it behaves like a line of people. A new item joins at the back. The next item out leaves from the front. Put the two structures… 2:05 Lesson 6 Linked lists A linked list is a chain of nodes, and each node holds two things: a piece of data, and a link to the next node. Here a node is just a dictionary with those… 2:14 Lesson 7 Searching Searching means finding whether a value is in a list, and where. Note the second half of that: what comes back is the position, not the value — the caller… 2:02 Lesson 8 Sorting Bubble sort only ever looks at neighbours. Walk the list and compare each pair in turn, swapping any that are the wrong way round. Watch the five: compared… 2:11 Lesson 9 Recursion Recursion is a function that calls itself, and every recursive function has exactly two parts. The base case is the smallest version of the problem, and it is… 2:38 Lesson 10 Classes & objects A class defines a new kind of thing — a type you invent yourself. This one says a point has an x and a y, and that is all it says: it holds no numbers, because… 2:18 Lesson 11 Inheritance & encapsulation Inheritance lets a new class start from an existing one instead of from nothing. Animal knows how to describe itself. Now two classes built on it: Bird and… 2:45 Lesson 12 Programming paradigms A paradigm is a style of organising a program — not a language, a style. The same problem can be written in any of them. Procedural is a list of steps, grouped… 2:40 Lesson 13 Hash tables A hash table is a list of slots, and the trick is that you never look for anything. You compute where it belongs. Give it the key cat and a function answers… 2:41 Lesson 14 Binary search trees A binary search tree keeps values sorted by where it puts them. Each node holds a value and links to up to two children, and one rule governs the lot. Take the… 2:12 Lesson 15 Graphs A graph is a set of nodes joined by edges. The circles are the nodes — you will also see them called vertices — and the lines are edges. That is the whole…

Log in or create account

IGCSE, A-Level & AP