Write an Algorithm and a Program

In the following, we will write an algorithm and then write a Scratch program that follows that algorithm.

Let's write the following steps for someone to follow (an algorithm), to draw a square:

  • draw a horizontal line 10cm in length anywhere on a piece of paper
  • rotate the piece of paper clockwise by 90 degrees
  • draw another horizontal line 10cm in length, starting from the end of the last drawn line
  • rotate the piece of paper clockwise by 90 degrees
  • draw another horizontal line 10cm in length, starting from the end of the last drawn line
  • rotate the piece of paper clockwise by 90 degrees
  • draw another horizontal line 10cm in length, starting from the end of the last drawn line

These instructions are not really a program until they are written in a programming language (Code), such as Scratch as shown in the Scratch blocks below:

To create programs, you not only need to know how to create precise and step-by-step instructions that a computer can follow to complete a task (which is what we call Computational Thinking), but also be able to take those instructions and put them in a language that the computer can understand (which is Programming or Coding).

In the next activities, we will look at some Computational Concepts, that are essential for understanding how to write algorithms, and then use them for Programming (Coding) our Dancing Cat program in Scratch.


Views
1 Total Views
1 Members Views
0 Public Views
Share on Social Networks
Share Link
Share by mail

Please login to share this webpage by email.