Chapter 4 Programming with Scratch^85THE OFFICIAL RASPBERRY PI BEGINNER’S GUIDE
when left arrow keypressed
switchcostume to left
turn^15 degreeswhen right arrow keypressed
switchcostume to right
turn^15 degreeswhen up arrow keypressed
move 10 stepswhen down arrow keypressed
move -10stepswhen clicked
gotox: 0 y: 0
pointindirection^90
repeat^6
turn^60 degrees
create cloneof myselfwhen clicked
forever
playsound dance around untildonewhen space keypressed
switchcostume to right
repeat^36
turn^10 degrees
move^10 stepsClick the green flag to start the program, then press the SPACE key to try out the new routine
(Figure 4-20, overleaf)! Don’t forget to save your program when you’re finished.