Ten critical algorithms for grade 10 (and 11 and 12)

An algorithm is a series of sequential steps to solving a coding problem. The algorithms listed here below may seem very short but they are critical nevertheless – perhaps one could argue that they are concepts more than algorithms. You must be able to code them quickly. Click on the links for the solutions.

1) Assignment and equivalence. Easy to get them confused. Includes a simple if statement.

2) Coding a running total. Overwriting the old value and replacing it with an updated value.

3) Being able to count. Example: How many numbers did I add together?

4) Building a new String – building a sentence from individual words

5) Multiple if statements. May or may not execute.

6) Multiple if statements with else. Will always execute.

7) The for loop. A fixed number of loops according to a built in condition and counter.

8) The while loop. A loop with a condition and counter. When the counter matches the condition the loop stops executing. 

9) Working on this still.  🙂

10) The guessing game. Three chances to guess a random number between 1 and 10