7_2_4

WHAT: Use logical reasoning to explain how some simple algorithms work

HOW:

Activity 1

Look at the screenshot below of a simple algorithm. Try to think about the actions that will be carried out when the green flag is clicked. Can you explain them? Try and write down some notes on a piece of paper or on a new document.

Activity 2 - Read this...

What does explain mean? When you explain something to somebody you should be very detailed and give causes or reasons.

If your answer to activity 1 was "It moves from left to right ten times" then this wouldn't be an explanation of the algorithm.

An explanation would look like this...

"Nothing will happen unless the green flag is clicked. This is because the program is waiting for an instruction to follow before it begins. The algorithm then sets up a loop that will happen 10 times. The instructions within that loop are to move 10 steps, wait 1 second and turn 180 degrees. These three steps will be carried out 10 times before the algorithm is complete."

Activity 3

Look at the screenshot above showing a different algorithm. Try explaining it and see if you can put in as much detail and reasoning as you can. What will happen and why?

Activity 4

We now have some logical statements in our simple algorithm (above). Can you find the areas of the algorithm where a decision needs to be made based on a condition?

.........

The first logical reasoning occurs when we see the statement "When right arrow key pressed". The move block placed below this will only run when the right arrow is pressed on the keyboard. We can use logical reasoning to say that Sprite1 won't move until that key is pressed. Once it has been pressed, it will move 10 steps.

The second logical reasoning occurs when we see "forever if touching Sprite2". We can use our logical reasoning skills to point out that Sprite1 will only say "OUCH!" when it is touching Sprite2.

.........

CHECK:

EMBED:

Using logical reasoning is a skill that needs to be practiced. It's a really good idea to look at lots of simple algorithms and try to figure out how they work, then explain them to somebody else.

You can find lots of algorithms on the Scratch website. Take a look at the starter projects and see if you can work out what is happening and why.

CLASSROOM IDEAS:

I have used Scratch as the main example here. This is because you can create quite simple algorithms to explain in Scratch. You may want to use real world examples as a starting point. The students need to be able to look at algorithms and explain what is happening using their own logical reasoning. Practice will enable them to get better at this skill.