txt, 1.76 KB
txt, 1.76 KB
txt, 1.25 KB
txt, 1.25 KB
txt, 1.3 KB
txt, 1.3 KB
txt, 824 Bytes
txt, 824 Bytes
txt, 286 Bytes
txt, 286 Bytes

This is a collection of Python implementations of algorithms discussed in the Cambridge A and A/S Level Computer Science text book.

They are also suitable for other exam boards and study at GCSE for more able students.

Programs included:

  • Using nested loops to print a rectangular pattern
  • Printing a pyramid pattern - not using functions
  • Printing a pyramid pattern - using functions
  • Printing a hollow pyramid pattern - not using functions
  • Printing a pyramid pattern - using functions

These algorithms are fun and satisfying for students due the the pleasing visual output. It is a good idea to give students the chance to implement them for themselves before providing solutions.

The Python code given in the teacher’s resource for this course is un-pythonic and often contains errors. The implementations provided here are written in a more pythonic style, are free from errors and provide an intuitive mapping to the pseudo-code given for the algorithms.

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

I hope you find this resource helpful.

Reviews

Something went wrong, please try again later.

This resource hasn't been reviewed yet

To ensure quality for our reviews, only customers who have purchased this resource can review it

Report this resourceto let us know if it violates our terms and conditions.
Our customer service team will review your report and will be in touch.