Term 1 · Computing · Age 13

Algorithms and programming

Term 1: 10 lessons in Computing · Age 13

  1. Reading and repairing pseudocode: This algorithm should output the larger of two numbers. Choose values for a and b and run it line by line.
  2. Following a loop: A FOR loop repeats the steps inside it a fixed number of times. The counter i goes up by 1 each pass.
  3. Predicting what a loop outputs: Good programmers predict the output before running code. Choose your prediction for this loop, then run it to check.
  4. Designing an algorithm: flowchart and pseudocode: A heater algorithm: input the temperature; if it is below 18 °C, turn the heater on.
  5. Calling a routine: A procedure is a named group of steps.
  6. Count-controlled loops in Python: for i in range(start, stop, step) repeats a fixed number of times. The loop stops before it reaches the stop value.
  7. Data types: Every value has a data type. It decides what you can do with the value: you can add integers, but not a name.
  8. Arrays and indexes: An array stores a set of related values under one name. Each item has an index, starting at 0. Move the slider to read different items.
  9. Working with strings: len() counts the characters in a string, including spaces. upper() and lower() change the case. Try three strings.
  10. Sequence, selection and iteration together: This quiz asks 3 questions in a loop, checks each answer with IF, and keeps a score. Choose which answers are right, then run it.

Revision and short notes

All of Computing · Age 13