Chapter 3. Silly Sentence Generator 3000: creating interactive programs

In this chapter, you’ll see how you can use Python to

  • Create a welcome message for a game
  • Add notes to your code
  • Ask users to input (or type in) information and save it using variables
  • Join strings
  • Display information back to the user based on that information

Visit a website, start up a game system, or open a mobile application, and it will probably ask you to enter a name and email address and create a password. These are all computer programs, and once you’re logged in, they may display special messages at the top of the screen saying things like “Welcome, Aaron” (or whatever your name is). Some programs are very sophisticated, remembering the games you’ve played, ...

Get Hello Raspberry Pi! now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.