Adventures In Raspberry Pi

Adventures In Raspberry Pi

Carrie Anne Philbin

Language: English

Pages: 256

ISBN: 1118751256

Format: PDF / Kindle (mobi) / ePub

Coding for kids is cool with Raspberry Pi and this elementary guide

Even if your kids don't have an ounce of computer geek in them, they can learn to code with Raspberry Pi and this wonderful book. Written for 11- to 15-year-olds and assuming no prior computing knowledge, this book uses the wildly successful, low-cost, credit-card-sized Raspberry Pi computer to explain fundamental computing concepts. Young people will enjoy going through the book's nine fun projects while they learn basic programming and system administration skills, starting with the very basics of how to plug in the board and turn it on.

Each project includes a lively and informative video to reinforce the lessons. It's perfect for young, eager self-learners—your kids can jump in, set up their Raspberry Pi, and go through the lessons on their own.

  • Written by Carrie Anne Philbin, a high school teacher of computing who advises the U.K. government on the revised ICT Curriculum
  • Teaches 11- to 15-year-olds programming and system administration skills using Raspberry Pi
  • Features 9 fun projects accompanied by lively and helpful videos
  • Raspberry Pi is a $35/£25 credit-card-sized computer created by the non-profit Raspberry Pi Foundation; over a million have been sold

Help your children have fun and learn computing skills at the same time with Adventures in Raspberry Pi.












2. Name your variable Health and ensure that For all sprites is checked before clicking OK. Figure 3-15 shows the window with the correct settings. A DV E N T U R E 3   C R E AT I N G S T O R I E S A N D G A M E S W I T H S C R AT C H 61 FIGURE 3-15  Creating a variable 3. You’ll see some orange blocks added to your Variables palette, and a small coun- ter box appears on the stage (see Figure 3-18). 4. Add the block Set Health to 0 to the starting point script you have already created.

locations in the adventure game. The function will take the current location as its argument, and then use conditionals to decide what to do based on that location. For most locations, the function will ask the player to input a direction. The specific input determines which location the player will move to next. Creating a Main Game Loop Up to this point, you wrote all of your game logic in the while loop. With the following code, you move most of the logic into separate functions, avoiding

answer to move the user to a new room. def handle_room(location): global hp if location == “start”: print(“You are standing on a path at the edge of a ; jungle. There is a cave to your left and a beach to ; your right.”) direction = get_input(“Do you want to go left or right? “, [“left”, “right”]) if direction == “left”: return “cave” elif direction == “right”: return “beach” elif location == “cave”: print(“You walk to the cave and notice there is an ; opening.”) print(“A small snake bites you,

main menu and navigate to Education➜Sonic Pi. If Sonic Pi is not on the menu, it is not already installed and you will need to download the application using the following instructions. 150 ADVEN T URES IN RASPBERRY PI CAR AN RIE NE S SAY ... Make sure that you are using the most up to date NOOBS Raspbian operating system available. 1. In an LXTerminal window, first type the following command to update your application packages: sudo apt-get update 2. Next, type the following command

include forums where you can ask questions or get in touch with other Raspberry Pi users. 6 ADVEN T URES IN RASPBERRY PI You can also contact me by sending me a message through my website, Time to start your adventures! INTRODUCTION 7 Adventure 1 You Have a Raspberry Pi. Now What? IN THE PAGES of this book you’ll discover how to do great things with your Raspberry Pi. You’ll create art and music, programs, games, even create your own jukebox! But first, you

Download sample