INTRODUCTION TO SCRATCH. About Me Resources Scratch Website Learn Scratch Washington-Lee Computer.
SCRATCH - A+ Computer Science · SCRATCH Ifs/Loops © A+ Computer Science - When the green flag is...
Transcript of SCRATCH - A+ Computer Science · SCRATCH Ifs/Loops © A+ Computer Science - When the green flag is...
![Page 1: SCRATCH - A+ Computer Science · SCRATCH Ifs/Loops © A+ Computer Science - When the green flag is clicked, the Bug will say "looping" for 2 seconds and](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3d7f6dc0eaac4e9c1d6c1e/html5/thumbnails/1.jpg)
SCRATCH
Ifs/Loops
© A+ Computer Science - www.apluscompsci.com
![Page 2: SCRATCH - A+ Computer Science · SCRATCH Ifs/Loops © A+ Computer Science - When the green flag is clicked, the Bug will say "looping" for 2 seconds and](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3d7f6dc0eaac4e9c1d6c1e/html5/thumbnails/2.jpg)
SCRATCH
Ifs/Loops
© A+ Computer Science - www.apluscompsci.com
Visit us at
www.apluscompsci.com
Full Curriculum Solutions
M/C Review Question Banks
Live Programming Problems
Tons of great content!
www.facebook.com/APlusComputerScience
![Page 3: SCRATCH - A+ Computer Science · SCRATCH Ifs/Loops © A+ Computer Science - When the green flag is clicked, the Bug will say "looping" for 2 seconds and](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3d7f6dc0eaac4e9c1d6c1e/html5/thumbnails/3.jpg)
SCRATCH
Ifs/Loops
© A+ Computer Science - www.apluscompsci.com
![Page 4: SCRATCH - A+ Computer Science · SCRATCH Ifs/Loops © A+ Computer Science - When the green flag is clicked, the Bug will say "looping" for 2 seconds and](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3d7f6dc0eaac4e9c1d6c1e/html5/thumbnails/4.jpg)
SCRATCH
Ifs/Loops
© A+ Computer Science - www.apluscompsci.com
Until I can hear the song Make it louder
Loops repeat as long as something is true
![Page 5: SCRATCH - A+ Computer Science · SCRATCH Ifs/Loops © A+ Computer Science - When the green flag is clicked, the Bug will say "looping" for 2 seconds and](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3d7f6dc0eaac4e9c1d6c1e/html5/thumbnails/5.jpg)
SCRATCH
Ifs/Loops
© A+ Computer Science - www.apluscompsci.com
As long as I am hungry I eat something
While I have pretzels I eat one
![Page 6: SCRATCH - A+ Computer Science · SCRATCH Ifs/Loops © A+ Computer Science - When the green flag is clicked, the Bug will say "looping" for 2 seconds and](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3d7f6dc0eaac4e9c1d6c1e/html5/thumbnails/6.jpg)
SCRATCH
Ifs/Loops
© A+ Computer Science - www.apluscompsci.com
loop if ( student is hungry and more pretzels left ) { student will eat 1 pretzel stick }
condition
![Page 7: SCRATCH - A+ Computer Science · SCRATCH Ifs/Loops © A+ Computer Science - When the green flag is clicked, the Bug will say "looping" for 2 seconds and](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3d7f6dc0eaac4e9c1d6c1e/html5/thumbnails/7.jpg)
SCRATCH
Ifs/Loops
© A+ Computer Science - www.apluscompsci.com
Loops are used to repeat a command or set of commands forever or for a set number of times.
![Page 8: SCRATCH - A+ Computer Science · SCRATCH Ifs/Loops © A+ Computer Science - When the green flag is clicked, the Bug will say "looping" for 2 seconds and](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3d7f6dc0eaac4e9c1d6c1e/html5/thumbnails/8.jpg)
SCRATCH
Ifs/Loops
© A+ Computer Science - www.apluscompsci.com
When the green flag is clicked, the Bug will say "looping" for 2 seconds and then wait 2 seconds before saying it again. This loop will run forever.
![Page 9: SCRATCH - A+ Computer Science · SCRATCH Ifs/Loops © A+ Computer Science - When the green flag is clicked, the Bug will say "looping" for 2 seconds and](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3d7f6dc0eaac4e9c1d6c1e/html5/thumbnails/9.jpg)
SCRATCH
Ifs/Loops
© A+ Computer Science - www.apluscompsci.com
![Page 10: SCRATCH - A+ Computer Science · SCRATCH Ifs/Loops © A+ Computer Science - When the green flag is clicked, the Bug will say "looping" for 2 seconds and](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3d7f6dc0eaac4e9c1d6c1e/html5/thumbnails/10.jpg)
SCRATCH
Ifs/Loops
© A+ Computer Science - www.apluscompsci.com
![Page 11: SCRATCH - A+ Computer Science · SCRATCH Ifs/Loops © A+ Computer Science - When the green flag is clicked, the Bug will say "looping" for 2 seconds and](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3d7f6dc0eaac4e9c1d6c1e/html5/thumbnails/11.jpg)
SCRATCH
Ifs/Loops
© A+ Computer Science - www.apluscompsci.com
Visit us at
www.apluscompsci.com
Full Curriculum Solutions
M/C Review Question Banks
Live Programming Problems
Tons of great content!
www.facebook.com/APlusComputerScience
![Page 12: SCRATCH - A+ Computer Science · SCRATCH Ifs/Loops © A+ Computer Science - When the green flag is clicked, the Bug will say "looping" for 2 seconds and](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3d7f6dc0eaac4e9c1d6c1e/html5/thumbnails/12.jpg)
SCRATCH
Ifs/Loops
© A+ Computer Science - www.apluscompsci.com
When the green flag is clicked, the Bug will say "looping" for 2 seconds and then wait 2 seconds before saying it again. This loop will run 5 times and then stop.
![Page 13: SCRATCH - A+ Computer Science · SCRATCH Ifs/Loops © A+ Computer Science - When the green flag is clicked, the Bug will say "looping" for 2 seconds and](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3d7f6dc0eaac4e9c1d6c1e/html5/thumbnails/13.jpg)
SCRATCH
Ifs/Loops
© A+ Computer Science - www.apluscompsci.com
![Page 14: SCRATCH - A+ Computer Science · SCRATCH Ifs/Loops © A+ Computer Science - When the green flag is clicked, the Bug will say "looping" for 2 seconds and](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3d7f6dc0eaac4e9c1d6c1e/html5/thumbnails/14.jpg)
SCRATCH
Ifs/Loops
© A+ Computer Science - www.apluscompsci.com
![Page 15: SCRATCH - A+ Computer Science · SCRATCH Ifs/Loops © A+ Computer Science - When the green flag is clicked, the Bug will say "looping" for 2 seconds and](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3d7f6dc0eaac4e9c1d6c1e/html5/thumbnails/15.jpg)
SCRATCH
Ifs/Loops
© A+ Computer Science - www.apluscompsci.com
Visit us at
www.apluscompsci.com
Full Curriculum Solutions
M/C Review Question Banks
Live Programming Problems
Tons of great content!
www.facebook.com/APlusComputerScience
![Page 16: SCRATCH - A+ Computer Science · SCRATCH Ifs/Loops © A+ Computer Science - When the green flag is clicked, the Bug will say "looping" for 2 seconds and](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3d7f6dc0eaac4e9c1d6c1e/html5/thumbnails/16.jpg)
SCRATCH
Ifs/Loops
© A+ Computer Science - www.apluscompsci.com
![Page 17: SCRATCH - A+ Computer Science · SCRATCH Ifs/Loops © A+ Computer Science - When the green flag is clicked, the Bug will say "looping" for 2 seconds and](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3d7f6dc0eaac4e9c1d6c1e/html5/thumbnails/17.jpg)
SCRATCH
Ifs/Loops
© A+ Computer Science - www.apluscompsci.com
if I am hungry I eat something
if I am tired I go to sleep
![Page 18: SCRATCH - A+ Computer Science · SCRATCH Ifs/Loops © A+ Computer Science - When the green flag is clicked, the Bug will say "looping" for 2 seconds and](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3d7f6dc0eaac4e9c1d6c1e/html5/thumbnails/18.jpg)
SCRATCH
Ifs/Loops
© A+ Computer Science - www.apluscompsci.com
if it is dark I turn a light on
if I can’t hear the song I make it louder
![Page 19: SCRATCH - A+ Computer Science · SCRATCH Ifs/Loops © A+ Computer Science - When the green flag is clicked, the Bug will say "looping" for 2 seconds and](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3d7f6dc0eaac4e9c1d6c1e/html5/thumbnails/19.jpg)
SCRATCH
Ifs/Loops
© A+ Computer Science - www.apluscompsci.com
When the green flag is clicked, the Bug will say ouch each time it is clicked with the mouse.
![Page 20: SCRATCH - A+ Computer Science · SCRATCH Ifs/Loops © A+ Computer Science - When the green flag is clicked, the Bug will say "looping" for 2 seconds and](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3d7f6dc0eaac4e9c1d6c1e/html5/thumbnails/20.jpg)
SCRATCH
Ifs/Loops
© A+ Computer Science - www.apluscompsci.com
![Page 21: SCRATCH - A+ Computer Science · SCRATCH Ifs/Loops © A+ Computer Science - When the green flag is clicked, the Bug will say "looping" for 2 seconds and](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3d7f6dc0eaac4e9c1d6c1e/html5/thumbnails/21.jpg)
SCRATCH
Ifs/Loops
© A+ Computer Science - www.apluscompsci.com
![Page 22: SCRATCH - A+ Computer Science · SCRATCH Ifs/Loops © A+ Computer Science - When the green flag is clicked, the Bug will say "looping" for 2 seconds and](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3d7f6dc0eaac4e9c1d6c1e/html5/thumbnails/22.jpg)
SCRATCH
Ifs/Loops
© A+ Computer Science - www.apluscompsci.com
Visit us at
www.apluscompsci.com
Full Curriculum Solutions
M/C Review Question Banks
Live Programming Problems
Tons of great content!
www.facebook.com/APlusComputerScience
![Page 23: SCRATCH - A+ Computer Science · SCRATCH Ifs/Loops © A+ Computer Science - When the green flag is clicked, the Bug will say "looping" for 2 seconds and](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3d7f6dc0eaac4e9c1d6c1e/html5/thumbnails/23.jpg)
SCRATCH
Ifs/Loops
© A+ Computer Science - www.apluscompsci.com
When the green flag is clicked, the Bug move back and forth across the screen. He will say Wow and Yahoo if he is at a certain position on the screen.
![Page 24: SCRATCH - A+ Computer Science · SCRATCH Ifs/Loops © A+ Computer Science - When the green flag is clicked, the Bug will say "looping" for 2 seconds and](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3d7f6dc0eaac4e9c1d6c1e/html5/thumbnails/24.jpg)
SCRATCH
Ifs/Loops
© A+ Computer Science - www.apluscompsci.com
![Page 25: SCRATCH - A+ Computer Science · SCRATCH Ifs/Loops © A+ Computer Science - When the green flag is clicked, the Bug will say "looping" for 2 seconds and](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3d7f6dc0eaac4e9c1d6c1e/html5/thumbnails/25.jpg)
SCRATCH
Ifs/Loops
© A+ Computer Science - www.apluscompsci.com
![Page 26: SCRATCH - A+ Computer Science · SCRATCH Ifs/Loops © A+ Computer Science - When the green flag is clicked, the Bug will say "looping" for 2 seconds and](https://reader034.fdocuments.in/reader034/viewer/2022043021/5f3d7f6dc0eaac4e9c1d6c1e/html5/thumbnails/26.jpg)
SCRATCH
Ifs/Loops
© A+ Computer Science - www.apluscompsci.com