The_Official_Raspberry_Pi_-_Beginner’s_Book_Vol1,_2018 (1)

(singke) #1

(^80) THE OFFICIAL RASPBERRY PI BEGINNER'S GUIDE
Click on the Scripts tab above the costume area, then drag two switch costume to left
Looks blocks under your left arrow and right arrow Events blocks, changing the one under
the right arrow block to read switch costume to right. Try the arrow keys again; the cat now
seems to turn to face the direction it’s swimming.
when left arrow key pressed
switch costume to left
turn^15 degrees
when right arrow key pressed
switch costume to right
turn^15 degrees
when up arrow key pressed
move^10 steps
when down arrow key pressed
move -10 steps

Free download pdf