Extended Task 3

Hi Susanna here,

I want to make a blackjack-like program that I can play for fun at home in between revising for Computer Science.

The aim of my blackjack game is to get as close to 21 as possible with the most number of cards, without going over.

So...

  • The user can choose whether to be hit with a new card (a number between 1 and 8) or fold and stop.

  • Each number they are dealt adds up to their total.

  • If the total goes over 21 then they lose.​

  • If they bust (when over 21) or folded then their final number and their number of cards is displayed.

Blackjack

For this task you will need to create a document and include the following sections (with screenshots where appropriate):

  • An introduction to explain the Purpose of your program.

  • List of Requirements for a successful program.

  • Screenshots of your code (with comments in your code to show understanding).

  • Testing – Create a plan to show how you will test your program and then explanations of any errors that you found and how they were fixed.

  • An Evaluation of what worked, what didn’t and how you met each of your requirements from your original list. Also, discuss further improvements that you could have made to improve your program.

Example solution:

Helpful reminders for this task:

  • Think about the type of loop that you need.

  • What variables will you need?

  • Remember to use an input. What will you ask the user? How will you use their response?

  • Remember to use ‘import random’ and rand.randint(your range) to create a random number.

  • What outputs do you need and when? What should you display… After each hand? At the beginning? At the end?

© CSNewbs 2019