Question: Write a python program that displays a welcome message and general instructions to the user for the bulls and cows game. (Hint: call a function
Write a python program that displays a welcome message and general instructions to the user for the bulls and cows game. (Hint: call a function that outputs the welcome and instructions.) Ask the player whether he/she wished to play or exit. If exit is entered, end the game. If not, start a new game. Randomly generate an integer with 4 unique digits. Each digit must be in the range of 1 to 9. Ask the player to enter his/her guess. Verify that the player entered 4 digits, if not 4 digits request the player reenter a valid number. (use a while loop to continue to ask the user for a valid input). Calculate and display the results of the number of bulls and cows. Continue the game until the correct guess is made or the player wishes to quit (do this in a loop). If the guess is correct congratulate the player, if the player "quits" the game prematurely then simply display the number and end the game. Ask the player whether they want to continue or exit. Start a new game or exit (must be done in a loop).
This is for python and I have not learned lists yet. Thank you.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
