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, 21.06.2019 19:20
Number of megabytes of ram in a computer. qualitative or quantitative? because
Answers: 3
question
Computers and Technology, 22.06.2019 12:30
Some of the first computer games were created in the early 1970s by college students experimenting after hours to see what the were capable of doing.
Answers: 3
question
Computers and Technology, 23.06.2019 12:00
From excel to powerpoint, you can copy and paste a. cell ranges and charts, one at a time. b. cell ranges and charts, simultaneously. c. charts only. d. cell ranges only.
Answers: 3
question
Computers and Technology, 24.06.2019 14:00
Fast answer i need for apex ! smartphones should be banned from the classroom in public schools so that students cannot cheat on test so easily? which is an example of a counter argument to the thesis above? a.the classroom is a place for learning not for making phone calls b. smartphones are useful learning tools in the modern classroom c.banning smartphones will not students pay attention to teachers any better d. banning smartphones would decreased incidents of theft
Answers: 2
You know the right answer?
Create a code for playing blackjack The first part of the code will create two variable.
One...
Questions
question
History, 26.11.2019 07:31
question
History, 26.11.2019 07:31
question
History, 26.11.2019 07:31
Questions on the website: 13722362