how do you check that a user input has four digits?
Check if the length of their input is equal to 4. If it is, convert their input to an integer. Put this inside a try statement that catches a
ValueError. Inside the catch you can continue the while loop to ask them again. If an error is not caught, then write the rest of the code for the program.
Here is my example: https://repl.it/@Dopest_Pleb/Bulls-and-cows