Bagel Pico Fermi is a math game where one person writes down a 3 or 4 digit number and the guessers try and figure it out based on process of elimination and strategy.Let explore more on the game play and program.
The Bagels Game Play
- Bagels is a deduction game in which the player tries to guess a random three-digit number (with no repeating digits) generated by computer. After each guess, the computer gives the player three types of clues.
- The three types of clues are:
- Bagels: None of three digits guessed is in the secret number.
- Pico: One of digits 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.
- When the secret number match one of the player’s numbers, it will give fermi and pico for wrong place.
Practice with Bagel Program
- Create a get secret number function to generate new secret number.
- Create get clues to check if the guess and secret number match or misplace or no in the list at all.
- If secret number and guess is match exact same position, then show “fermi“
- If secret number and guess is in the list, then show “pico“
- Create is only digits function to make sure the input is number and clear if not.
- In the main program, tell the user to think of a number and its position.
- The maximum guess set to 10.
- Ask user for input for guesses which will be restrict to 3 number and only number.
- Print the clues with each guess
- If number of tries reach maximum guess, print that your guess is running out
Let play the Bagel game and have fun with your friends or kids from 3+ years old.
Thanks for reading and have a great day!!