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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!