Explore structured computer science courses, solved problems, simulations and Python activities.
A torch shines when its switch is on, and a hand dryer runs when your hands are under it and the power is on. These are decisions with two answers, yes or no, written as 1 and 0. You learn the symbols of the logic gates, and what NOT, AND and OR do with every possible input. Then you join two gates and work out what comes out. It covers the first part of the Boolean logic topic of Cambridge IGCSE Computer Science.
A stair light can be switched from the top or the bottom of the stairs, and either switch changes it. That needs a gate that asks whether two inputs are different. You meet NAND, NOR and XOR, the other three gates of the syllabus, and you set out truth tables in the order the examination uses. Then you name an unknown gate from its table. It covers the gates and truth tables of the Boolean logic topic of Cambridge IGCSE Computer Science.
A greenhouse fan should switch on when it is hot and the window is shut, or when the air is too damp. A rule like that can be written three ways: as a logic expression, as a circuit of gates and as a truth table. You learn to go from any one of them to the others, for circuits with up to three inputs and one output. It covers the circuits, expressions and truth tables of the Boolean logic topic of Cambridge IGCSE Computer Science.
A class register has a row for each student and a column for each detail, such as the name or the date of birth. That is a database table. You learn to define a table from what has to be stored, to name its fields and records, to choose a data type for each field and to pick a primary key. You also see how validation stops wrong data from getting into the table.
How does a library find every book by one author, with the newest first? It asks its database a question written in SQL. You write SQL scripts with SELECT and FROM to choose the fields, WHERE to choose the records and ORDER BY to sort them in ascending or descending order. For each script you work out the exact output, and you run it in Python to check.
How many tickets were sold on Saturday, and how much money did they bring in? SQL can answer both in one line each. You use COUNT to count records and SUM to add up a field, and you join two conditions with AND or OR. Then you practise the examination skills: reading a script and giving its output, completing a script with missing parts, and finding the error in a script.
A ticket machine asks for your age, picks a price and adds up the bill. Each step is a variable, a decision or a loop. You write these steps in Cambridge pseudocode, next to the Python you may know already, and you trace them by hand to see what they output. It covers the first part of unit 8.1 of Cambridge IGCSE Computer Science.
A long program is easier to write, test and change when it is cut into named parts. You define procedures and functions with parameters, use the routines every language gives you, such as MOD, DIV, ROUND and RANDOM, and cut and change strings. Then you put it all together in a program another person can read, the way the long scenario question of the exam asks. It covers the rest of unit 8.1 of Cambridge IGCSE Computer Science.
A class register holds thirty names, and a seating plan holds rows and columns of them. An array keeps all of them under one name, and a file keeps them after the program stops. You declare and fill one-dimensional and two-dimensional arrays with loops, and you open, read, write and close text files. It covers units 8.2 and 8.3 of Cambridge IGCSE Computer Science.
A big program, like the one that runs a school library, is too large to write in one go. A programmer first finds out what it must do, then splits it into smaller parts, and plans the steps of each part. You meet the four stages of the program development life cycle, break systems into sub-systems, draw structure diagrams, and read and draw flowcharts with the standard symbols. It covers the first part of unit 7 of Cambridge IGCSE Computer Science.
A computer does exactly what it is told, so a plan must be exact too. Pseudocode is a way to write each step precisely, in a form any programmer can read. You write and read pseudocode in the exam style and follow an algorithm by hand in a trace table. Then you choose normal, abnormal, extreme and boundary test data, and find and correct the errors in an algorithm. It covers the middle part of unit 7 of Cambridge IGCSE Computer Science.
Some small algorithms turn up in almost every program: adding up a list of numbers, counting how many pass a test, finding the highest score, searching for a name and putting values in order. You learn to write each one in pseudocode and in Python, and to check the data a user types in before a program uses it. It covers the standard methods of solution and the validation and verification checks of unit 7 of Cambridge IGCSE Computer Science.