Free!
With Membership
\$39.99
Suggested price

# Brain Games Python

​99 Brain Teasers to Energize Your Brain Cells and Python Logic Skills

​The Groundbreaking New Puzzle Book That

1. Revives Your Brain Cells
2. Boosts Your Computational Intelligence
3. Launches Your Programming Skills in Python

​... Even If You Have Zero Programming Experience!

```# PUZZLE
'''Bob is 4 years younger than Frank and 10 years older than Alice. Ann is with 35 years 6 years older than Alice. What's the age difference (in years) between the oldest and youngest person?'''
```

Can you solve this puzzle? Or try the next one:

```# PUZZLE
[11, -10, 4, -3, 4, 4, ?]
```

What's the next sequence element? Here's a third more Pythonic puzzle:

```# PUZZLE
a, b = True, True

if b or a or not a and not b:
if a:
print('love')
elif b and a or not a:
print('42')
print('42')
elif a and b or not a:
if a or b or not b or not a:
print('42')
print('yes')
else:
print('yes')
```

The book is full with 99 such brain puzzles that make you smarter -- in logics, intelligence, and Python programming!

(Written for absolute beginners and intermediates in the Python programming language.)

• ### Categories

• Computers and Programming
• Python
• Computer Science
• Gaming
• Education
• Crafts and Hobbies
• Games
• Sports and Fitness
• Self-Help
• Psychology
• ### Feedback

Email the Author(s)

Christian Mayer

Chris is the founder of the programming education company FINXTER, author of the Coffee Break Python series of self-published books, the popular programming book Python One-Liners (NoStarch 2020), a doctorate computer scientist, and owner of one of the top 10 Python blogs worldwide.

His research interests include graph theory and distributed systems.

You can join the FINXTER email academy and consume a large body of free email courses about various topics in computer science and programming.

Lukas Rieger

I love coding and espacially in Python! Python is easy to learn and at the same time it is very powerful. Through the books I would like to help you to discover this! Therefore we designed our puzzle based teaching approach which helps you to learn quickly what you really need and with fun.

I have been working as a Software developer for several years. Currently I'm in the field of operations/SRE of cloud applications.

#### Bundles that include this book

\$154.91
Bought separately
\$59.99
Bundle Price
\$184.90
Bought separately
\$69.99
Bundle Price
\$224.89
Bought separately
\$79.99
Bundle Price
\$254.88
Bought separately
\$89.99
Bundle Price
\$284.87
Bought separately
\$99.99
Bundle Price
\$298.86
Bought separately
\$109.99
Bundle Price

###### Jim Woodword

Great work!!

I'm just about done with "Brain Games Python", so it will be time to decide which book to buy next. Keep up the great work!!

1.1 Intended Audience . . . . . . . . . . . . . . 6

1.2 Puzzle-based Learning to Code . . . . . . . 7

1.3 How to Read This Book . . . . . . . . . . . 12

1.4 How to Test and Train Your Skills? . . . . . 14

2 How to Boost Your Intelligence? 10 Tips From Science 18

2.1 Sleep More . . . . . . . . . . . . . . . . . . . 18

2.2 Don’t Do Drugs . . . . . . . . . . . . . . . . 19

2.3 Eat Brain Food . . . . . . . . . . . . . . . . 19

2.4 Meditate . . . . . . . . . . . . . . . . . . . . 20

2.5 Exercise . . . . . . . . . . . . . . . . . . . . 20

2.6 Read More . . . . . . . . . . . . . . . . . . . 21

2.7 Set Goals . . . . . . . . . . . . . . . . . . . 22

2.8 Focus . . . . . . . . . . . . . . . . . . . . . . 22

2.9 Play Your Strengths . . . . . . . . . . . . . 23

2.10 Play Brain Games . . . . . . . . . . . . . . . 24

3 Absolute Computer Science Basics for NonCoders 26

3.1 What is Program Code? . . . . . . . . . . . 26

3.2 How to Read Program Code? . . . . . . . . 27

3.3 Variables . . . . . . . . . . . . . . . . . . . . 27

3.4 Control Flow . . . . . . . . . . . . . . . . . 29

3.5 Functions . . . . . . . . . . . . . . . . . . . 33

3.6 Boolean Operators . . . . . . . . . . . . . . 34

3.7 Truth Tables . . . . . . . . . . . . . . . . . 35

The Negation Operator NOT . . . . . . . . 35

The AND Operator . . . . . . . . . . . . . . 36

The OR Operator . . . . . . . . . . . . . . . 36

3.8 Advanced Boolean Operators . . . . . . . . 37

The Exclusive-Or (xor) Operator . . . . . . 37

The Implication . . . . . . . . . . . . . . . . 38

3.9 Boolean Operators Precedence . . . . . . . . 38

3.10 Happy Puzzle Solving! . . . . . . . . . . . . 39

4 Kindergarten Logic 40

5 Complete the Sequence 53

6 If Confusion 66

7 Find the Age Difference 79

8 Eleven DNF puzzles 92

9 Eleven All and Any Puzzles 106

10 Word Similarity 119

11 Mental Math 142

13 Final Remarks 169

13.1 Your skill level . . . . . . . . . . . . . . . . 169

13.2 Where to go from here? . . . . . . . . . . . 171

Bibliography 182

### Oxfam America

###### Right the Wrong
http://www.oxfamamerica.org

Oxfam America is a global organization working to right the wrongs of poverty, hunger, and injustice. We save lives, develop long-term solutions to poverty, and campaign for social change. As one of 17 members of the international Oxfam confederation, we work with people in more than 90 countries to create lasting solutions.

Oxfam America is a global organization working to right the wrongs of poverty, hunger, and injustice. We save lives, develop long-term solutions to poverty, and campaign for social change. As one of 17 members of the international Oxfam confederation, we work with people in more than 90 countries to create lasting solutions. Our vision: A just world without poverty. Our mission: To create lasting solutions to poverty, hunger, and social injustice.

### The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

### Earn \$8 on a \$10 Purchase, and \$16 on a \$20 Purchase

#### We pay 80% royalties on purchases of \$7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between \$0.99 and \$7.98. You earn \$8 on a \$10 sale, and \$16 on a \$20 sale. So, if we sell 5000 non-refunded copies of your book for \$20, you'll earn \$80,000.(Yes, some authors have already earned much more than that on Leanpub.)In fact, authors have earnedover \$13 millionwriting, publishing and selling on Leanpub.Learn more about writing on Leanpub

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.