Getting Unstuck in an Exam

This article will help you to achieve your full potential in exams for any subject. Have you ever been in an exam where you have read a question and your brain has...

Python Loops and Flowcharts

In this lesson we are going to learn how to convert between Python code and flowchart representations of loops when designing algorithms. Consider the following code. As with most code examples in...

Computer Science Pedagogy

This post is a work in progress where I will collect pedagogical tips about teaching Computer Science distilled from my 15+ years’ teaching experience. They are phrased as advice to teachers, but...

Python Simple Dice Game

Here’s a simple program in Python that demonstrates some important fundamental concepts in computer programming. The program simulates two players taking it in turns to roll a 6-sided dice, and keeps track...

Python Trace Tables

The ability to trace the values of variables during program execution is a great aid in ensuring your code is doing what it is supposed to do and in avoiding logic errors...

Musical Bubble Sort in Python

I am a firm believer in offering a wide variety of perspectives on the topics I teach in Computer Science. I also like to make connections between Computer Science and other subjects....

The Stack Data Structure in Python

The stack is a wonderfully simple data structure which despite its simplicity makes many powerful algorithms possible. Some of the uses for a stack data structure in software development are: The Depth-First...

Python Programming – List Mutation

A Surprising Feature of Python Lists What do you expect the output of the following Python code to be? def mutate_or_not(a_list): a_list[0] = "I've changed" my_list = [1, 2, 3] mutate_or_not(my_list) print(my_list)...