Question
python programming Bulls and Cows is a guessing game where a player will try to guess a sequence of numbers. The player will submit a
python programming Bulls and Cows is a guessing game where a player will try to guess a sequence of numbers. The player will submit a guess and will receive a response based on how many correct numbers they have chosen. A bull is a correct number in the correct position and a cow is a correct number in an incorrect position. e.g. if the number sequence is 1234 and the player guesses 1356 the response would be one bull and one cow as 1 is a correct number and in the correct position (a bull) and 3 is a correct number, but not in the correct position (a cow). If the player enters 1243 theresponsewould be two bulls and two cows, as all numbers are correct but two are not in the correct positions.
You are to create a program in python language to play the Bulls and Cows game based on non-repeating four digit numbers (all four digits are different no repetition). A player should be able to enter a four digit number and receive a response based on the game criteria: Win four correct numbers, all in the correct position Bull a correct number in the correct position Cow a correct number in the incorrect position The player will be presented with how many bulls and cows they have found after each attempt. Write a program that sets a four digit number and allows players to attempt to guess that number as per the criteria in the scenario. Apply loop control structures to limit the number of attempts a player may make and to ask the player if they wish to play again after a game is completed. Apply appropriate user input validation in order to provide correct input by the user e.g. only four digit numbers . Your program should be able to demonstrate following features: Pre-defined and user-defined functions Global and local variables. Produce a test plan and document evidence of testing Evaluate the effectiveness of your testing process, including test data and test schedule Produce user documentation for the completed program. Compose an overall evaluation of your game
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