110 likes | 129 Views
Learn how selection structures can alter program output. Practice decomposing problems with inputs for effective program design. Understand the use of IF, ELSE IF, and ELSE statements for selective execution.
E N D
LearningObjectives • Explain how selection is used to change a program output • Decompose a problem with inputs to help design a program • Describe the use of IF, ELSE IF, ELSE to run statements ‘selectively’ Starter Hello Year 7!Please log in and open your Programming Design Notebook Presentations at Program 2.
LearningObjectives • Explain how selection is used to change a program output • Decompose a problem with inputs to help design a program • Describe the use of IF, ELSE IF, ELSE to run statements ‘selectively’ Talk to the person next to you for 5 minutes. Tell them three things about you that you think that they might not know! (you’re going to use this in your program) Get Started!
LearningObjectives • Explain how selection is used to change a program output • Decompose a problem with inputs to help design a program • Describe the use of IF, ELSE IF, ELSE to run statements ‘selectively’ IF , THEN, ELSE (selection) Our Key Terms Output (sound) Input (click) Wait
LearningObjectives • Explain how selection is used to change a program output • Decompose a problem with inputs to help design a program • Describe the use of IF, ELSE IF, ELSE to run statements ‘selectively’ Create Your All About Me Program Save Your Project As: All About Me To get started, click on the folder icon at the top right. Then click ‘New project’
LearningObjectives • Explain how selection is used to change a program output • Decompose a problem with inputs to help design a program • Describe the use of IF, ELSE IF, ELSE to run statements ‘selectively’ Today’s program is called ‘It’s All About Me’ – It’s an interactive collage all about you! You could extend your program by adding in an object that moves when it’s clicked. IF Ball is clicked & on left THEN move right ELSE move left Is this description clear enough for a computer to understand? If not, we need to decompose! What Are We Making?
LearningObjectives • Explain how selection is used to change a program output • Decompose a problem with inputs to help design a program • Describe the use of IF, ELSE IF, ELSE to run statements ‘selectively’ Decomposed: • Sprite 3 is a cat image facing right • It will move right 1 step every 0.2 seconds • And play the meow sound every 3rd step • IF it reaches the edge, it will turn 180⁰ Decomposing is breaking a problem down into more specific steps. In this program, a sprite of a cat will walk out and meow. What Is There To Decompose? How does the IF affect the way the program runs?
LearningObjectives • Explain how selection is used to change a program output • Decompose a problem with inputs to help design a program • Describe the use of IF, ELSE IF, ELSE to run statements ‘selectively’ Has it been done? Click:http://www.youtube.com/watch?v=V_EnVgXA7sk
LearningObjectives • Explain how selection is used to change a program output • Decompose a problem with inputs to help design a program • Describe the use of IF, ELSE IF, ELSE to run statements ‘selectively’ Before you open Scratch, plan what your ‘Build a Band’ will do and look like. Decompose & Plan! In this program, we will have multiple ‘sprites’ which will tell me something about you when they are clicked. These could be either a written message, or a recorded ‘sound’ of your voice. The user can click on your sprites to find out about you Use your Design Notebook to plan out how your collage will work & what it will look like. 8 9 11 12 10 13 14 15 7 5 0 6 4 3 2 1 mins Time: 15 minutes total! (timer starts automatically)
LearningObjectives • Explain how selection is used to change a program output • Decompose a problem with inputs to help design a program • Describe the use of IF, ELSE IF, ELSE to run statements ‘selectively’ Now you have a program design, open up Scratch and create your interactive collage. Stuck? You can watch the help video again on your Design Notebook. Get Programming! 20 18 17 16 15 14 13 12 10 8 7 5 4 3 2 1 9 11 0 20 6 19 mins Time: 20 minutes total! (timer starts automatically)
LearningObjectives • Explain how selection is used to change a program output • Decompose a problem with inputs to help design a program • Describe the use of IF, ELSE IF, ELSE to run statements ‘selectively’ Swap seats with someone nearby & leave you Design Notebook on your own keyboard. Write your comments on the code in front of you in the Design Notebook in front of you (don’t forget to write your name at the top!) When you are done, return you your chair. What Do YOU think? 9 7 6 3 1 10 10 0 5 2 8 4 mins Time: 10 minutes total! (timer starts automatically)
LearningObjectives • Explain how selection is used to change a program output • Decompose a problem with inputs to help design a program • Describe the use of IF, ELSE IF, ELSE to run statements ‘selectively’ Homework Project Complete the Program Evaluation section of your Design Notebook for your All About Me Program. Remember your evaluation should use: Well presented full sentences with Point, Explain, Example