PYTHON LOOP INVARIANTS

Writing robust code is always a good idea, but is particularly important for mission critical contexts, such as where safety is an issue. There are several historical examples of where faulty code...

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...

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....