Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

plz type it for me 2. Write a program to play a very modified version of spades. The program will select two hands of 5

image text in transcribed

plz type it for me

2. Write a program to play a very modified version of spades. The program will select two hands of 5 cards for a single player and the computer dealer. The hands should be chosen using a function and the random methods we discussed in class. Your function should check the cards to be sure that they have not been used in the other hand. If so, then another card will be chosen at random until a hand can be formed. After the second hand is dealt, all cards are available again. A winner of the game will be chosen based on the sum of all cards in the hand. The sum of the cards will be calculated as follows: 2, 3, 10 face value Jacks 11 Queens = 12 Kings-13 Aces 14 The suit of the cards is used as a multiplier. Spades are worth 2 times the face value giving an advantage to any hands containing spades. All other suits are worth face value only

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 Management System MCQs Multiple Choice Questions And Answers

Authors: Arshad Iqbal

1st Edition

1073328554, 978-1073328550

More Books

Students also viewed these Databases questions

Question

What the benefits of good communication are.

Answered: 1 week ago