subject

Write an application inpython that allows a user to play the game bulls and cows against a computer. the game works as follows: the computer chooses a 4-digit number in secret. the digits must all be different. the user then guesses the number and the computer provides the number of matching digits. if the matching digit is in the right position it is a "bull", if it is on a different position it is a "cow". for example: computer chooses: 3691 user guesses: 1649 computer answers: 1 bull and 2 cows if the user guesses a number with repeat digits that is partially correct the rule is that a correct digit can only count once and bulls count before cows. so for example computer chooses: 3691 user guesses: 4211 computer answers: 1 bull and 0 cows your program should report the number of attempts the user needed to guess the number. hint: you may find it easier to store these numbers as strings or in lists rather than as plain integers.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 23:30
You picked the corridor which led you here. if the guards find you, they're going to be really angry! what is the synonym of angry
Answers: 1
question
Computers and Technology, 22.06.2019 01:00
Which option marks all modification made within a document? review comment track changes balloons
Answers: 1
question
Computers and Technology, 23.06.2019 00:30
Which one of the following is considered a peripheral? a software b mouse c usb connector d motherboard
Answers: 2
question
Computers and Technology, 23.06.2019 12:00
Which of these is an example of an integrated presentation? a. a table created in powerpoint b. an image pasted into powerpoint c. a caption created in powerpoint d. an excel chart pasted into powerpoint
Answers: 1
You know the right answer?
Write an application inpython that allows a user to play the game bulls and cows against a computer....
Questions
question
Mathematics, 19.08.2020 14:01
question
Mathematics, 19.08.2020 14:01
question
Mathematics, 19.08.2020 14:01
question
Mathematics, 19.08.2020 14:01
question
Mathematics, 19.08.2020 14:01
Questions on the website: 13722360