Skip to Main Content
Invent Your Own Computer Games with Python , 4th Edition
book

Invent Your Own Computer Games with Python , 4th Edition

by Al Sweigart
December 2016
Intermediate to advanced content levelIntermediate to advanced
376 pages
9h 5m
English
No Starch Press
Content preview from Invent Your Own Computer Games with Python , 4th Edition

11THE BAGELS DEDUCTION GAME

image

Bagels is a deduction game in which the player tries to guess a random three-digit number (with no repeating digits) generated by the computer. After each guess, the computer gives the player three types of clues:

Bagels None of the three digits guessed is in the secret number.

Pico One of the digits is in the secret number, but the guess has the digit in the wrong place.

Fermi The guess has a correct digit in the correct place.

The computer can give multiple clues, which are sorted in alphabetical order. If the secret number is 456 and the player’s guess is 546, the clues would be “fermi pico pico.” The “fermi” is ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Art of Computer Programming, The: Volume 1: Fundamental Algorithms, 3rd Edition

Art of Computer Programming, The: Volume 1: Fundamental Algorithms, 3rd Edition

Donald E. Knuth
Expert Python Programming – Fourth Edition - Fourth Edition

Expert Python Programming – Fourth Edition - Fourth Edition

Michał Jaworski, Tarek Ziade, Tarek Ziadé

Publisher Resources

ISBN: 9781492019152Errata Page