subject
Computers and Technology, 30.10.2020 22:50 Asrys

CODE THIS IN PYTHON PLEASE I NEED HELP BADLY Ninety-Nine is a two-player card game played with a deck of 40-cards. The cards are labeled 0 – 9. To start, each player gets 3 cards and the remaining cards are placed face
down on the table (the pile). In an actual game, the point total is set to zero but for this program, an initial point total will be given. Cards are played in the order they are added to a player’s hand. Each player in turn puts down a card and changes the point total according to the point value of his card and then selects a card from the top of the pile. Each card adds its face value in points (e. g. a 5 is worth five points) to the point total except for certain cards that have special values or meanings:
1. A 9 is a pass (and does not change point total)
2. A 4 subtracts 10 points from the total
3. A 0 adds either 1 or 11 to the point total. The 11 is played first as long as it does not put
the point total over 99.
If a player plays a card that puts the total over 99, that player loses the game.
GET THE USER TO INPUT THE CARDS AND TOTAL POINT VALUE.
INPUT:

An input line will contain 11 integers. The first integer gives the initial point total. The next 3 integers will represent the 3 cards dealt to the player. The remaining integers will be, in order, the card picked by the player and the card played by the dealer.

OUTPUT:

Print the point total when the game ends and who won (player or dealer).

SAMPLE INPUT OUTPUT

87, 5, 8, 9, 7, 4, 6, 3, 9, 0, 2 101,dealer

78, 2, 4, 8, 3, 8, 5, 0, 6, 9, 8 100,dealer

95, 9, 0, 9, 0, 1, 0, 1, 0, 2, 5 100, player

65, 0, 8, 0, 7, 0, 6, 0, 5, 1, 4 105, dealer

Manual Sample run:

87, 5, 8, 9, 7, 4, 6, 3, 9, 0, 2

P P P P D P D P D P

Total = 87
Players turn 5 Total 92
Dealers turn 4 Total 82
Players turn 8 Total 90
Dealers turn 3 total 93
Players turn 9 pass total 93
Dealers turn 0 Total 94
Players turn 7 Total 101
Total 101, Dealer is the winner as the card value exceeded when player was dealing the card

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 03:40
Hello my name is mihai and i need your : )i have to do a python project in computer science and i’m really busy with my mocks this period of time besides this i’m not good at coding so could someone pls pls pls sort me out ? i actually beg ; ))
Answers: 1
question
Computers and Technology, 22.06.2019 04:50
Which are steps taken to diagnose a computer problem? a) reproducing the problem and using error codes b) reproducing the problem and troubleshooting c) using error codes and troubleshooting d) using error codes and stepping functions
Answers: 1
question
Computers and Technology, 22.06.2019 17:40
Gabe wants to move text from one document to another document. he should copy the text, paste the text, and open the new document highlight the text, select the cut command, move to the new document, make sure the cursor is in the correct location, and select the paste command select the save as command, navigate to the new document, and click save highlight the text, open the new document, and press ctrl and v
Answers: 1
question
Computers and Technology, 22.06.2019 18:00
Martha is a healer, a healthcare provider, and an experienced nurse. she wants to share her daily experiences, as well as her 12 years of work knowledge, with people who may be interested in health and healing. which mode of internet communication can martha use?
Answers: 3
You know the right answer?
CODE THIS IN PYTHON PLEASE I NEED HELP BADLY Ninety-Nine is a two-player card game played with a de...
Questions
question
Mathematics, 11.04.2020 16:41
question
Mathematics, 11.04.2020 16:49
question
Mathematics, 11.04.2020 16:51
question
Mathematics, 11.04.2020 16:52
Questions on the website: 13722360