<aside>
🎮 Level up your Python with this fun exercise. You'll develop a game called Pico, Fermi, Bagel.
</aside>
Game Instructions
Guess a randomly-generated number with no repeating digits. After each guess, you're given the following clues:
- If the guess has no correct digits: "Bagel"
- For each correct digit in the wrong place: "Pico"
- For each correct digit in the right place: "Fermi"
What You'll Need:
- Functions, variables, if-statements, loops, lists
- Hint: If there's any information is missing, Google is your best friend! (You'll need to look up import random for generating a random number)
- input(): a function that reads text input from the user
- value is read as a string, can be stored in a variable
- join(): a string function that joins all items in its parameters, separated by the string used to call it
- ex. " ".join(["Hello", "I'm", "Steph"]) => "Hello I'm Steph"
Extension
Want an extra challenge? Try these!
- Do not assume that all inputs will be valid numbers with the correct # of digits -> check for validity in your program
- Track the number of guesses it takes to win
- Create a maximum # of guesses
- Challenge: Program an algorithm to play the game
<aside>
🎮 Solution | Don't look until you've tried it yourself.
</aside>