Download presentation
Presentation is loading. Please wait.
1
Exploring Computer Science – Lesson 4-5
Event Driven Programs Exploring Computer Science – Lesson 4-5
2
Journal Entry How do programs know what to do next? In other words…
If you are surfing the web, how does the computer know what page to go to next? Or… If you are playing Call of Duty: Ghosts, how does the game know what you want to do?
3
Event Driven Programs The programs you have written so far have really just been animations. You click the and then sit back and watch what happens. In all these cases the program controls the action. In an event driven program, the user controls the actions by typing a key, clicking the mouse, etc. The outcome of the program is not known in advance.
4
Scratch Event Blocks Scratch event blocks are found in the control section and have a shape like this: You have already used one event block!
5
Scratch Event Blocks There are 2 more event blocks:
When a sprite is clicked When _ key is pressed
6
Your First Game You will be creating an Alphabet Learning Game.
7
Alphabet Game Requirements
Have at least 10 different letters. Have a theme for your letter game (i.e. animals, food, etc.) Sprites change costume when clicked on. Sprites change costume when letter is typed on keyboard Use the “say _ for _ sec” to output what the letter stands for (i.e. “E is for Elephant”) Sprites all turn to letters when the “when green flag clicked”
8
Alphabet Game – Extra Credit
For extra credit… Use a sound file or a microphone to record sounds for all the letters and play the sound when the letter is clicked or typed (i.e. “E is for Elephant” or the sound of an elephant)
9
Rubric Do you have? Points Possible
Have at least 10 different letters. 20 Have a theme for your letter game (i.e. animals, food, etc.) 15 Sprites change costume when clicked on. Sprites change costume when letter is typed on keyboard Use the “say _ for _ sec” to output what the letter stands for (i.e. “E is for Elephant”) Sprites all turn to letters when the “when green flag clicked” 10 Extra Credit Use a sound file or a microphone to record sounds for all the letters and play the sound when the letter is clicked or typed (i.e. “E is for Elephant” or the sound of an elephant). One point for each sound. TOTAL: 100 Rubric
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.