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 11:00
What is the foundation for proper monitoring, load balancing and routing in distributed systems
Answers: 3
question
Computers and Technology, 23.06.2019 00:00
What engine component is shown in the above figure?
Answers: 1
question
Computers and Technology, 23.06.2019 16:00
Kenny works with an it company. his company is about to launch new software in the market. he has to ensure that this new software is functional and meets all of the quality standards set up at the planning stage. which job profile is kenny likely to have? kenny is likely to have the job profile of a blank .
Answers: 2
question
Computers and Technology, 23.06.2019 18:30
Write a program that prints the day number of the year, given the date in the form month-day-year. for example, if the input is 1-1-2006, the day number is 1; if the input is 12-25-2006, the day number is 359. the program should check for a leap year. a year is a leap year if it is divisible by 4, but not divisible by 100. for example, 1992 and 2008 are divisible by 4, but not by 100. a year that is divisible by 100 is a leap year if it is also divisible by 400. for example, 1600 and 2000 are divisible by 400. however, 1800 is not a leap year because 1800 is not divisible by 400.
Answers: 3
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
Arts, 23.10.2021 22:30
question
Mathematics, 23.10.2021 22:30
question
Mathematics, 23.10.2021 22:30
question
Mathematics, 23.10.2021 22:30
Questions on the website: 13722363