Download presentation
Presentation is loading. Please wait.
1
Exploring Computer Science Lesson 4-12
Timers Exploring Computer Science Lesson 4-12
2
Objectives The students will be able to: Create a timer
3
Timers Timers are simply a variable that counts down (or up).
You already know how to initialize a variable You know how to add or subtract one You know how to “wait” 1 second Bottom line – You know how to make a timer! I don’t need to teach you.
4
Timer Project How to make a timer in Scratch:
Create a variable called timer. When the flag is clicked, initialize the timer to 10. Continually, wait 1 second and subtract one from timer Output the current time either with a sprite or just show the variable DO NOT USE A REPEAT 10 Check if the timer = 0 If the timer = 0 make either the background or a huge sprite say “Time’s Up” When the green flag is clicked, everything should start over. Be creative as to what you want your program to look like. Make sure the timer stops at 0 and does not continue into negatives.
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.