# Writing and testing algorithms

In this lesson, we will write an algorithm for controlling our models. We will then turn that algorithm into code. Lastly, we will test and debug our program.

# Video

Click on the play button to start the video. If your teacher asks you to pause the video and look at the worksheet you should:

• Click "Close Video"
• Click "Next" to view the activity

Your video will re-appear on the next page, and will stay paused in the right place.

# Worksheet

These slides will take you through some tasks for the lesson. If you need to re-play the video, click the ‘Resume Video’ icon. If you are asked to add answers to the slides, first download or print out the worksheet. Once you have finished all the tasks, click ‘Next’ below.

#### Unit quizzes are being retired in August 2023

Why we're removing unit quizzes from the website >
Quiz:

# Writing and testing algorithms

Images from Crumble software

Q1.Where is selection being used in this program?

1/4

Q2.Which part of the program is an example of an infinite loop?

2/4

Q3.Which part of the program is an example of a count countrolled loop?

3/4

Q4.Which part of the program ensures a condition is repeatedly checked?

4/4

#### Unit quizzes are being retired in August 2023

Why we're removing unit quizzes from the website >
Quiz:

# Writing and testing algorithms

Images from Crumble software

Q1.Where is selection being used in this program?

1/4

Q2.Which part of the program is an example of an infinite loop?

2/4

Q3.Which part of the program is an example of a count countrolled loop?

3/4

Q4.Which part of the program ensures a condition is repeatedly checked?

4/4

# Lesson summary: Writing and testing algorithms

## Time to move!

Did you know that exercise helps your concentration and ability to learn?

For 5 mins...

Move around:
Walk

On the spot:
Dance