top of page

Extended Task 3

noun-project-5888539-FFFFFF.png

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:

Extended Task 3.png

Helpful reminders for this task:

  • Think about the type of loop that you need.

  • Will you need more than one loop?

  • 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 randint 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?

bottom of page