concept random number in category raspberry pi

appears as: rdom numbers, random number
Hello Raspberry Pi!: Python programming for kids and other beginners

This is an excerpt from Manning's book Hello Raspberry Pi!: Python programming for kids and other beginners.

  • Use Python code libraries to generate random numbers
  • Figure 7.14. After displaying the game title and instructions, you need to define variables to store important game information, including a random number the player is trying to guess. The main loop in the game is repeated to allow the user to make five guesses; it also blinks the lights.