Chapter 3. Silly Sentence Generator 3000: creating interactive programs
Listing 3.1. Adding notes to your program
Listing 3.2. Gathering input from the player
Chapter 4. Norwegian Blue parrot game: adding logic to programs
Listing 4.1. Creating comments at the top of your new program
Listing 4.2. Making the title display on the screen
Listing 4.3. String literals that hold multiple lines of text
Listing 4.4. Creating an age for the parrot
Listing 4.5. Getting a guess and storing it in a variable
Listing 4.6. Adding logic to the game with an if statement
Listing 4.7. Using an if statement to check a password
Listing 4.8. Using a while loop to repeat instructions
Chapter 5. Raspi’s Cave Adventure
Listing 5.1. Choosing the left or right cave
Listing 5.2. Improving the code for the player’s choice
Listing 5.3. Creating functions for the left cave
Listing 5.4. Using the new functions to simplify your code
Listing 5.5. Calling functions for each of the left cave choices
Chapter 6. Blinky Pi
Chapter 7. Light Up Guessing Game
Listing 7.1. Setting up the Pi’s GPIO pins
Listing 7.2. Functions that flash LEDs different colors
Listing 7.3. Refactoring the three flashing functions to a single function
Listing 7.4. Creating variables and displaying the game title and instructions
Chapter 8. DJ Raspi
Listing 8.1. Setting up GPIO pins for input
Listing 8.2. DJ Raspi title screen
13.59.136.170