Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a simple menu-driven program called Game of Cards.using pyhthon Each card has thirteen different numbers. The thirteen possible numbers are: 1 to 13. This

Write a simple menu-driven program called Game of Cards.using pyhthon Each card has thirteen different numbers. The thirteen possible numbers are: 1 to 13. This game has two cards.

In this game, the maximum bet amount is $200 and the minimum bet amount is $5. The amount of the winning prize is directly proportional to the number of matched cards after the two cards have been generated for each game.

Rules for this game:

Initial cash for this game is specified by player.

Maximum bet for each game is $200.

Minimum bet for each game is $5.

Two cards are used per game.

Player can place his or her bet amount for each game.

The winning prize is based on how many matched cards have been found:

If one matched cards have been found, then the prize is 2x.

If two matched cards have been found, then the prize is 4x.

If no matched card has been found, then the player loses his or her bet for this game-session.

Example of a menu could look like the following:

Game of cards

**************************************

Help (display rules for this game)

Enter the total amount of money you bring in the casino for gambling

Roll the cards and then place your bet here (Max. is $50, Min. is $1)

Generate the random numbers for the three cards

Display your gambling results:

current cash on hand

number of winnings

total number of games played so far

Quit

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DATABASE Administrator Make A Difference

Authors: Mohciine Elmourabit

1st Edition

B0CGM7XG75, 978-1722657802

More Books

Students also viewed these Databases questions

Question

What is DDL?

Answered: 1 week ago