subject

Create a code for playing blackjack The first part of the code will create two variable.
One for the first card you’re dealt and one for the second.
Add those two variable for the total score you have

Then
Create a while loop that will stop if your score becomes above 21 or if the user says that they wish to stay.
Inside the while loop have ask the user if they want to hit or stay. Inside of the question be sure to print the current total that the user has
If the user inputs “hit” add a random number between 1 and 11 to their score.
If they input “stay” then print their final score
Then
Create a code for the dealer
The dealer should also start with two cards (remember you can always copy and paste and then edit your code)
Create a while loop for the dealer. (there is rule that dealers must always hit if their total is 16 or under
Print the dealers score once they are done.

Finally
Check if your score is higher than the dealer’s.
If it is you win
If not, you lose

Remember.
If either the dealer or you reach over 21 then that person automatically loses

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 22:30
One of your customers wants you to build a personal server that he can use in his home. one of his concerns is making sure he has at least one backup of their data stored on the server in the event that a disk fails. you have decided to back up his data using raid. since this server is for personal use only, the customer wants to keep costs down. therefore, he would like to keep the number of drives to a minimum. which of the following raid systems would best meet the customer's specifications? a. raid 0 b. raid 1 c. raid 5 d. raid 10
Answers: 3
question
Computers and Technology, 23.06.2019 01:30
How do you set up a slide show to play continuously, advancing through all the slides without requiring your interaction? a. click set up slide show, and then select the loop continuously until ‘esc' and show without narration options. b. click set up slide show, and then select the loop continuously until ‘esc' and use timings, if present options. c. click set up slide show, and then select the show presenter view and use timings, if present options. d. click set up slide show, and then select the show without animation and browsed at a kiosk (full screen) options.
Answers: 3
question
Computers and Technology, 23.06.2019 06:30
Who can provide you with a new password when you have forgotten your old one? your provide you with a new password in case you forget your old one.
Answers: 3
question
Computers and Technology, 23.06.2019 16:00
Which analyst position analyzes information using mathematical models to business managers make decisions?
Answers: 1
You know the right answer?
Create a code for playing blackjack The first part of the code will create two variable.
One...
Questions
Questions on the website: 13722367