Computational Thinking (How to think like a computer scientist) Lesson 2 Algorithms
Objectives • To know the term ‘Algorithm’ means • To create algorithms to everyday situations
Recap - The four cornerstones of Computer Science
What is an algorithm? • Algorithms are one of the four cornerstones of Computer Science. • An algorithm is a plan, a detailed set of step-by-step instructions to solve a problem. • If you can: • • tie shoelaces make a cup of tea get dressed prepare a meal • then you already know how to follow an algorithm.
Video
Describing Algorithms • There are two ways of describing an algorithm: • Flowcharts – A graphical representation of the steps involved • Pseudocode – English like instructions detailing every step
Activity 1 • Download the Sequencing Worksheet from this link: https: //ict 4 u. net/Computer. Science/includes/CT/L 2 -Sequencing Worksheet. docx Or http: //bit. ly/2 Y 85 jj 8 • Make sure that you save it to your CT folder. • Open the document and follow the instructions
Algorithm Problem: How would you write an algorithm that draws this picture of a house like this? : Clue: Think about last lesson’s topic on decomposition
The Top Level • Draw the outline of the house • Draw the chimney • Draw the door • Draw the windows Main Draw Outline Draw Chimney Draw Door Draw Windows
Activity 2 – Drawing the Windows • Complete the task on Page 2 of the Sequencing Worksheet • Remember to save your work! • Download the starter code using this link: https: //ict 4 u. net/Python/includes/Code. Txt/Window%20 St arter. txt Or http: //bit. ly/2 XY 7 L 0 p