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, 21.06.2019 17:30
Data for which there is temporarily no room in ram is diverted to where on your computer? question 9 options: a) the paging file on the hard drive b) the system file on the hard drive c) the memory file on the hard drive d) the cpu cache
Answers: 2
question
Computers and Technology, 21.06.2019 23:00
The animal classthis class represents a an animal residing at a zoo. it has a weight (in pounds),height (in inches), a name, and a color. the methods in the class include constructors,getters, and a tostring. you will finish the implementation of these methods. referto the code documentation.1.getters: you will need to implement getter methods. these get a value (froma member variable) in the animal class. you will make a getter method toreturn each variable (weight, height, name, color). reference getname if youare having issues.2.tostring: you will need to finish the tostring method. this returns a stringcontaining information about an animal. the output string should be of theformat: ” (name) , a ( color )â’colored animal . ( weight ) pounds , ( height ) inches .\n”the height and weight are formatted to 1 decimal place. recall from lab 1how to format strings neatly using string. see the reference sectionfor more about string.format.
Answers: 2
question
Computers and Technology, 23.06.2019 09:00
What provides an array of buttons for quick access to commonly used commands and tools
Answers: 1
question
Computers and Technology, 23.06.2019 09:30
Name the range function that would generate the following list of integers values: 0,1,2,3,4,5.
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
Mathematics, 26.10.2021 15:10
question
Mathematics, 26.10.2021 15:10
question
History, 26.10.2021 15:10
Questions on the website: 13722363