Lessons in this series
Work through in order - each lesson builds on the last.
1
Variables, Constants and Data Types
What is a variable? How does the computer store a number differently from a word? Covers integers, floats, strings, booleans and type casting - the building blocks of every program.
2
Input, Output and String Handling
Getting data in and out of a program, then manipulating text. Length, upper/lower, slicing, find and ASCII - the string operations that appear on almost every exam paper.
3
Arithmetic and Boolean Operators
More than just plus and minus. Integer division, modulus, exponentiation - and the boolean operators that control logic. Includes operator precedence and how to avoid the classic MOD mistake.
4
Selection: IF, ELIF, ELSE
Teaching a computer to make decisions. Single-branch, two-branch and multi-branch selection, nested IF statements, and the ordering error that loses marks every year.
5
Count-Controlled Iteration: FOR Loops
Repeating steps a known number of times. range() with start, stop and step, nested loops, and common patterns like summing a series - all shown side by side in both languages.
6
Condition-Controlled Iteration: WHILE Loops
Repeating until something is true - or false. Validation loops, sentinel values, infinite loop pitfalls and why WHILE is the right choice when you cannot predict the number of iterations.
7
Lists and Arrays
Storing multiple values under one name. Indexing, traversal, append and remove, 2D lists for grids and tables - and the off-by-one error that trips up most students at least once.
8
Subroutines: Procedures and Functions
Breaking programs into reusable blocks. Defining and calling, passing parameters, returning values, local vs global scope - and why functions make programs easier to test and maintain.
9
File Handling
Making data survive when the program closes. Opening, reading, writing and appending to text files, the with/using statement for safe file access, and handling file-not-found errors.
10
Exception Handling
Writing programs that do not crash. try/except/finally vs try/catch/finally, the most common exceptions and what triggers them, and how to write robust programs that handle the unexpected.
What you'll cover
Data and variablesTypes, casting, constants - how programs store and manipulate information
Control flowSelection and iteration - making programs decide and repeat
Data structuresLists and 2D arrays for storing collections of values
SubroutinesFunctions and procedures for modular, reusable code
Files and exceptionsPersistent storage and robust error handling
Language toggle
Every code example, every interactive tool, every quiz answer appears in both Python and C#. Toggle between them once and your preference is saved across all 10 lessons.
Python
C#
Also free: Algorithms
8 lessons on searching, sorting and algorithm analysis
Also free: Computer Systems
5 lessons on CPU architecture, memory and storage