Bubble Sort Algorithm for Cambridge A/S Level Computer Science

It may have struck you that the Python solutions provided in the Cambridge A Level Computer Science Teachers Resource are rather clumsy and contain several errors.

This collection of Python versions of the Bubble Sort Algorithm has been battle-tested and is ready for error-free use.

You will notice that I have translated the CIE pseudo-code construct of REPEAT...UNTIL using

while True: # commands if condition: break

which I consider the best conceptual equivalent available in Python.

You can also easily use the code to create Bubble Sort practice questions such as:

"Suppose you have the following list of numbers to sort:

[19, 1, 9, 7, 3, 10, 13, 15, 8, 12]

What will the list look like after 3 passes of the bubble sort algorithm?"

I hope you find this resource useful. If so, please leave a positive review review to let others know.

$13.16
Save for later
  • CIE_Bubble_Sort.txt

About this resource

Info

Created: Dec 11, 2019

txt, 2 KB

CIE_Bubble_Sort

Report a problem

Tes Paid Licence

How can I re-use this?