### CS24 : An Algorithm a Day

Analytical look at the purpose of simple algorithms in flowchart and pseudocode format.  Introducing and practising trace tables to follow the progress of an algorithm.  Introduce breakpoint checking.

We are learning ...
• How to determine the purpose of simple algorithms
• How to write simple algorithms for a variety of purposes
So that we can ...
• Determine the purpose of simple algorithms
- describe algorithms in terms of their inputs, processing and output
- use trace tables / dry run testing to determine the output of an algorithm
- determine variable values in an algorithm at any given point
• Write simple algorithms as
- structured English
- flowcharts
- pseudocode
Click to engage

 Activity 1The purpose of algorithms

Let's start by looking at some algorithms to see what they do. Work on your own through the examples in the presentation, answering the questions on paper.

 Activity 2Writing simple algorithms

Work through the following algorithm examples. Try to complete one per day or as directed by your teacher. Your teacher will keep track of which challenges you have attempted.

You should produce your algorithm in "Structured English" and "Pseudocode" but remember ...
• Make sure that your Pseudocode follows the suggested Pseudocode conventions;
• Make sure that your Pseudocode does NOT look like Python;
You should then attempt to make your algorithm come to life in Flowgorithm - I've checked and they all can :)

It's OK to work in a group :)

Work together and check your proposed solutions with as many other students as possible! To help you out, I've made a super easy Structured English and Pseudocode Cheat Sheet which you can download. Noice :)

An flowchart solution to the algorithm challenge problem - nice!

 Activity 3Debugging challenges

Throughout your programming experience, you've been debugging code - the following exercise is a formal chance for you to show how you can fix syntax, runtime and semantic errors youself.

Debugging Python code
Where we learn how to spot and correct errors in Python code

We are very used to debugging Python code and spotting errors that we or others have made in their programs. Here are some simple challenges for you.

Dip in at the level that you think you are currently capable of completing.