Standard deck of 52 playing cards

Assignment Help Other Subject
Reference no: EM13272848

Write a program to implement a simple %u201CHi-Lo%u201D game using a standard deck of 52 playing cards.

Your game should ask the user to enter their bankroll.  

Your program must verify that the user enters a positive real number. 

If the user did not enter a positive real number, continue to prompt them to enter their bankroll until they do so.  

The program should continue to repeat until either the user indicates that they want to quit or until there is no money remaining in their bankroll.

When the game ends, display for the user the total number of games played, total number of wins, total number of losses, total number of ties and the ending amount in their bankroll.

For each play of the game, ask the user to enter their bet.

Verify that the user has sufficient funds remaining in their bankroll to cover the bet and that the bet is less than $100.00.  

Draw a card and display it for the user.  

Ask the user if they think the next card will be higher or lower than the card which was drawn.  

Draw a second card making sure that it is different in some way (either face, suit or both) from the first card drawn. 

If the card is the same, continue to draw the second card until a different card is drawn. 

If the user guessed correctly add the amount of the bet to their bankroll. 

If the user guessed incorrectly, subtract the amount of the bet from their bankroll. 

If the second card drawn is a card of the same face value but a different suit, the game is a tie and no change should be made to the user%u2019s bankroll. 

Display the amount in the user%u2019s bankroll after each play of the game before asking whether the user wants to play again.

Reference no: EM13272848

Questions Cloud

Beneficiary of a life insurance policy : You are the beneficiary of a life insurance policy. The insurance company informs you that you have two options for receiving the insurance proceeds. You can receive a lump sum of $50,000 today or receive payments of $641 a month for 10 years. You ca..
Media articles often focus on corrupt business practices : Media articles often focus on corrupt business practices or individuals who have committed criminal acts, etc., and cynics may argue that morality is less significant in the 21st Century. What do you think?
Article related to healthcare programs : Summary of the Article (two to three paragraphs maximum). Why was the article written about the topic at the current time? This should be completed in your own words and talk about the key points of the article. You should not repeat the article in y..
Describe how organizations can utilize the models : Describe how organizations can utilize the models to drive ethical decision-making, including how those organizations might integrate the model into their business ethics programs.
Standard deck of 52 playing cards : Write a program to implement a simple %u201CHi-Lo%u201D game using a standard deck of 52 playing cards. Your game should ask the user to enter their bankroll. Your program must verify that the user enters a positive real number.
When measuring moral dilemmas-hypothetical dilemmas : When measuring moral dilemmas, Kohlberg suggests the use of hypothetical dilemmas. However, Straughan disagrees and states that hypothetical dilemmas do not evoke the same reactions as familiar dilemmas and, hence, the findings are not as useful in m..
All international manufacturers of rubber chemicals : Bayer AG, Syndial SpA, Crompton Corp., DuPont Dow Elastomers, and Zeon Chemicals are all international manufacturers of rubber chemicals. They have all been indicted as participants in a price-fixing scheme that drove up the costs of rubber chemicals..
Net income does not appear in the numerator of the : Net Income does not appear in the numerator of the
Health care planning and needs assessment : Analyze the five categories or levels of planning and determine which one is the most useful overall.

Reviews

Write a Review

 

Other Subject Questions & Answers

  Using the human memory model

Using the human memory model and your lesson outline, describe what strategies you will use to maximise learning. Your response should be no more than one page.

  About the doctrine of commercial speech

Which of the following is true about the doctrine of commercial speech?

  Behaviourist approach in psychology

What is the behaviourist approach in psychology? What are the main assumptions? Where have the ideas been applied and what are the strengths and weaknesses?

  Experiencing budget problems

Many of the states in the United States are experiencing budget problems. A number of legislatures are considering legalizing gaming (gambling).

  Describe bruce as it pertains to social class

Bruce, a US Senator, owns about 3,000 acres of prime farmland, is one of the wealthiest men in the county, and enjoys a great deal of prestige in his community. In view of this, how would sociologists describe Bruce as it pertains to social class?

  Contrast the description-explanation objectives of science

Compare and contrast the description and explanation objectives of science. How are they different and how are they similar?

  Networks of interconnected commercial communities

Which of the following were networks of interconnected commercial communities through- out Africa, Europe and Asia?

  Document a work-based learning program

Explain why this training needs to be conducted. Prepare an outline to set the scene and describe the industry - type of industry, new developments in training in the industry and any future directions

  Analyze influence of religion on western civilization

Analyze the influence of religion on western civilization from fall of Rome to Age of Absolutism and the Reformation (up to 18th century if you would like).

  Hemispheric specialization than a paralegal

An office worker's personal differences may specialization in right and left hemispheres and are related to occupational success? For example, might a designer who relies on spatial skills have a different pattern of hemispheric specialization than a..

  Major issue illustrate the global nature of religion

Over the course of the semester we have witnessed various ways in which world religions have become global religions and interacted with cultural, political, and economic forces of globalization. Finally, discuss how these two major issue illustrate ..

  Elements of an ideal sikh society exist

Explain whether the elements of an ideal Sikh society exist in the U.S. and/or in other parts of the world

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd