Part 2. Playing with Python

Minecraft, Pac-Man, and Super Mario Brothers are great games, and they were all created by programmers like you. You’ll have to gain more skills to make games like those, but you can create some basic games pretty quickly. All these games have the game player interact with the computer. The computer is programmed with logic: instructions that control how the game reacts to the player’s choices. The game is constantly responding to input from the user, whether it is a button press or a key press.

Games are a good way to learn programming because they combine creativity, fun, and logical thinking into one project. Games are also interactive, requiring the user to make choices and the computer to respond to those choices. The goal is to make the game entertaining, so you’ll use your creativity and imagination to add magic to your games. You decide how you want to program your game and how it responds!

In part 2, you’ll build your own interactive games using Python and your Raspberry Pi. You’ll start in chapter 3 by making a program that creates ridiculous sentences. You’ll learn to use Python to ask users to enter information, store the information in variables, and make your Pi respond. Chapter 4 dives into how you can create a guessing game that makes your Pi more intelligent: it will make simple decisions based on the player’s choices. You’ll also see how to use Python to make your Raspberry Pi repeat some instructions over and over again. In chapter 5, you’ll don a helmet and headlamp and descend into an underground cave. You’ll create a text-based game where the player can choose where to go; based on their choices, they may find riches or face an untimely demise.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.133.109.30