How JustAnswer Works:
  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site. Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.
Ask Mr. Gregory White Your Own Question
Mr. Gregory White
Mr. Gregory White, Professor
Category: Homework
Satisfied Customers: 5240
Experience:  M.A., M.S. Education / Educational Administration
Type Your Homework Question Here...
Mr. Gregory White is online now
A new question is answered every 9 seconds

Using the Swift Programming Language: To get experience

Customer Question

Using the Swift Programming Language:
To get experience working with your language, you will write a program that allows the user to play blackjack. In the game of Blackjack, players are dealt cards and try to get a hand of cards that scores as close to 21 as possible without going over. Cards are scored as follows:
Card Value 22 33 44 55 66 77 88 99
10 Jack Queen King Ace
10 10 10 10 11 or 1
Aces are scored as 11 or 1 based on what is better for the player. If counting an ace as 11 keeps the player under 21, it will count as 11, otherwise, it will count as 1. For example, if the player has the cards Queen, Ace, and 9, then their score will be 20.
If the player has the cards King and Ace, then their score will be 21. A score of 21 is also called “blackjack”blackjack.
Your program should give the user two random cards, and ask if they want to hit (receive a new card) or stay. At each step, you should display their cards (number and suit). You should keep asking them this until they either choose to stay or get a score over 21.
You should then print out the numerical score. If the score is 21, you should print ‘Blackjack!’, if the score is over 21, you should print ‘Bust!’.
You don’t need to provide a way for the user to play multiple games. Your submission must include the following:

All source code that is necessary to compile and run your program. Your code must be well formatted and commented. The comments should explain any confusing portions of your program and highlight aspects of the program that demonstrate the uniqueness or any special features of the language.
A readme.txt file that explains the steps necessary to compile and run your program. If any special software must be downloaded and installed, be certain to include links to the necessary installation files and instructions for completing the installation process.
Screen shot(s) showing your program executing.
Submitted: 1 year ago.
Category: Homework
Expert:  Mr. Gregory White replied 1 year ago.

Hello, my name is Greg.

Can you provide the specifics of what you are needing for this prompt as what you have provided above does not really show what is required. The more information you can provide, the easier it will be to find an expert who is best able to support your needs.

You can upload using a file sharing site such as or and then share the link here with us.

Customer: replied 1 year ago.
I am not really sure what you are asking, I am trying to write a program for the game "Blackjack" or "21" using Apple's programming language, Swift. Above was simply a in-depth description of what the guidelines the game should follow.
Expert:  Mr. Gregory White replied 1 year ago.

You need to spend $3 to view this post. Add Funds to your account and buy credits.