Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Can someone please help me write a code for this using vba excel. I'm a beginner and I have no idea how to set it

image text in transcribed

Can someone please help me write a code for this using vba excel. I'm a beginner and I have no idea how to set it up. If you could also include screenshot of the test run it'd be greatly appreciated. Thank You

Write a VBA program that will create a simplified blackjack game. The requirements for the code are outlined below In the simplified game the player and the dealer will only be able to havea maximum of 3 cards delt. . All cards will be randomly assigned values between 2 -11 .The player will be shown their first 2 cards and the dealers 1 card on the excel spreadsheet . The program will then ask the player if they would like to hit or stay . If they chose hit another card will be dealt and then it's the dealers turn .Have the total of all the cards dealt to the player appear on the spreadsheet . ifthey chose stay no card is dealt and it is the dealers turn .The dealer's decision will be made by the program based on the following criteria o If the sum of the first 2 cards 21 a message box will appear saying Dealer BlackJack Game Over o If the sum of the first 2 cards 15 the dealer will stay o If the sum of the first 2 cardss 15 the dealer will take another card .Have the total of all the cards dealt to the dealer appear on the spreadsheet e Have a message box appear to let the player know if they win or lose the hand Create a button that says DEAL to start the game onus: Get the program to run for up to 5 cards dealt to each the player and the dealer

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

Ai And The Lottery Defying Odds With Intelligent Prediction

Authors: Gary Covella Ph D

1st Edition

B0CND1ZB98, 979-8223302568

More Books

Students also viewed these Databases questions