#1 Bagels

In Bagels, a deductive logic game, you must guess a secret three-digit number based on clues. The game offers one of the following hints in response to your guess: “Pico” when your guess has a correct digit in the wrong place, “Fermi” when your guess has a correct digit in the correct place, and “Bagels” if your guess has no correct digits. You have 10 tries to guess the secret number.

The Program in Action

When you run bagels.py, the output will look like this:

Bagels, a deductive logic game. By Al Sweigart al@inventwithpython.com I am thinking of a 3-digit number. Try to guess what it is. Here are some clues: When I say: That ...

Get The Big Book of Small Python Projects 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.