CHAPTER 2

image

Create a Custom Calculator

One of the simplest things that can be done with Python is to use it as a fancy calculator. Wait, a calculator isn’t a game. Why are we talking about calculators? Boring....

Hey, to calculate objects dropping, bullets flying, and high scores, we need calculations. Plus, any true geek will consider a calculator a toy rather than a torture device! Let’s start our game education with calculators. Don’t worry, we’ll start graphics by Chapter 6.

A simple calculator program can be used to ask the user for information and then calculate boring things like mortgage payments, or more exciting things like the trajectory ...

Get Program Arcade Games: With Python and Pygame, Fourth Edition 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.