subject

Write a program that would let the user to play the following game with computer. Computer will ask the user how much he or she wants to bet. Computer will flip a coin (a random outcome of heads or tails) and does not display the outcome to the user yet. Computer will randomly decide if it wants to lie about the outcome or not. Based on computer decisions to lie or not about the outcome, the computer would display the actual outcome or lies (for example it displays tails when the result of the coin flip was actually heads when the decision is to lie or it displays tails when the result of the coin flip was indeed tails when the decision is to not lie). Computer then ask the user "Do you dare to call me a liar? (yes/no) ". If the user calls computer a liar when computer indeed lied or the user does not call the computer a liar when computer did not lie the user will win, otherwise the computer wins. Program should let the user know if he or she has won or lost that round. Program should display the total earnings at the end of each round. The user should be able to play the game as long as he or she places a bet more than 0.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 14:30
If the polar bear were taken out of the food chain what would happen to the seal population the seal population would diminish the seal population would grow dramatically the seal population would stay the same the seal population would decrease slightly
Answers: 1
question
Computers and Technology, 22.06.2019 22:40
When you type the pwd command, you notice that your current location on the linux filesystem is the /usr/local directory. answer the following questions, assuming that your current directory is /usr/local for each question. a. which command could you use to change to the /usr directory using an absolute pathname? b. which command could you use to change to the /usr directory using a relative pathname? c. which command could you use to change to the /usr/local/share/info directory using an absolute pathname? d. which command could you use to change to the /usr/local/share/info directory using a relative pathname? e. which command could you use to change to the /etc directory using an absolute pathname? f. which command could you use to change to the /etc directory using a relative pathname?
Answers: 3
question
Computers and Technology, 22.06.2019 23:30
What are listed in the vertical columns across the top of the event editor? a. file names b. conditions c. check marks d. action types
Answers: 1
question
Computers and Technology, 23.06.2019 04:31
Q13 what function does a security certificate perform? a. creates user accounts b. scrambles data c. identifies users d. creates password policies e. provides file access
Answers: 1
You know the right answer?
Write a program that would let the user to play the following game with computer. Computer will ask...
Questions
question
Physics, 06.04.2020 16:10
question
English, 06.04.2020 16:10
question
Mathematics, 06.04.2020 16:11
Questions on the website: 13722359