Question
Computer generates a 4-digit number randomly. Ask the user to guess a number (4-digit). For each digit that the user guessed correctly, in the correct
Computer generates a 4-digit number randomly. Ask the user to guess a number (4-digit). For each digit that the user guessed correctly, in the correct place, they get a black point. For every digit the user guessed correctly in the wrong place they get a white point. Each time the user makes a guess, you should give the points for that guess (how many black and how many white points they get). Once the user guesses the correct number (4 black points), the game is over. At the end you should tell the user how many attempts he/she made. Can i get a python output? i'm struggling with the white points.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started