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 13:00
Which option should u select to ignore all tracked changes in a document
Answers: 1
question
Computers and Technology, 23.06.2019 02:30
Experimental data that is expressed using numbers is said to be
Answers: 1
question
Computers and Technology, 23.06.2019 06:00
What makes myhexadecimalnumber a child of mynumber? which methods does myhexadecimalnumber inherit directly from the mynumber class? what can an instance of the mynumber class do? what can an instance of the myhexadecimalnumber class do? which methods are overridden? why are they overridden? how many examples of overloading are there? why was this done? where is the super keyword used? what is it doing? why isn’t the incoming value set immediately in the second myhexadecimalnumber constructor? how many examples can you find of an inherited method being called?
Answers: 1
question
Computers and Technology, 23.06.2019 10:50
Your friend kayla is starting her own business and asks you whether she should set it up as a p2p network or as a client-server network. list three questions you might ask to kayla decide which network to use and how her answers to those questions would affect your recommendation.
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
Mathematics, 27.03.2020 18:52
question
Mathematics, 27.03.2020 18:52
Questions on the website: 13722367