4TRANSFORMING AND STORING NUMBERS WITH ALGEBRA

“Mathematics may be defined as the subject in which we never know what we are talking about, nor whether what we are saying is true.”—Bertrand Russell

image

If you learned algebra in school, you’re probably familiar with the idea of replacing numbers with letters. For example, you can write 2x where x is a placeholder that can represent any number. So 2x represents the idea of multiplying two by some unknown number. In math

class, variables become “mystery numbers” and you’re required to find what numbers the letters represent. Figure 4-1 shows a student’s cheeky response to the problem “Find x.”

Figure ...

Get Math Adventures with Python 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.