

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
computer science project - gcse
Typology: Cheat Sheet
1 / 2
This page cannot be seen from the preview
Don't miss anything!


Snowman is an alternative version of the game ‘hangman’. In the game a word is selected and those playing the game guess the letters that could be in the word. When a player guesses a correct letter the position(s) of this letter in the word are revealed. When a player guesses incorrectly an attempt is used and part of the snowman is drawn. 1). The program chooses a random word from a list of words. In easy mode, this should be 5 letters or less, in medium mode, this should be between 6 & 10 letters (inclusive). In difficult mode, the word selected is 11 or more letters. 2). Once the word is selected – the user is shown the number of letters in underscore form. E.g is “snowball” was selected, the user would see _ _ _ _ _ _ _ _ 3). The user keeps guessing letters, or, if they are feeling brave, the whole word. If they guess a single letter and they are correct, reveal where that letter is within the word. E.g if the user guessed “L” in snowball then the display would be _ _ _ _ _ _ L L 4). If they guess more than one letter, treat this as a guess of the word itself. Either they are totally correct, or totally wrong. 5). The case of the guesses doesn’t matter (so ‘l’ is the same as ‘L’) 6). Each time a user guesses a wrong letter, display the previously incorrect letters alongside the hidden word. Don’t let them guess this letter again. For either a wrong letter or a wrong word guess, show that an attempt has been used displaying the following stages of a snowman being built by using ascii art: 1). Bottom snowball (. ) ._ _ _ _ _ _ . 2). Middle snowball --<(. )>--- (. ) . _ _ _ _ _ . 3). Head snowball ( ‘ v ‘ ) --<(. )>--- (. ) . _ _ _ _ _ _. 4). Top hat
| _ | ( ‘ v ‘ ) --<(. )>--- (. ) ._ _ _ _ _ _ _.
Due 8:00am Mon 15 th Jan 2024 1). Upload your file with the following name USERNAME_Snowman.py e.g 23BobF_Snowman.py 2). You should test your program to make sure that you have not created any errors. 3). The output to your program should be EXACTLY the same as the example programs provided to you.
No matter how good your program is, and what criteria it meets, you will be deducted a grade from your final mark for not including each of the following (up to 4 grades deducted!) : ● Comments ● Well named variables ● Suitable file name ● Crashes when runs You should create your program in the following order:
Parts 1 & 2 of the program. Choose a word based on the difficulty & display the word as a series of underscores.
Some of part 3. Allow the user to guess letters and update the word that is displayed to the user after each guess. At this stage, your program will not check whether they have already guessed that letter or consider how many incorrect attempts there are.
All of part 3, 4 & 5. This includes guesses of the whole word and not just single letters. At this stage, your program will still not check whether they have already guessed that letter or consider how many incorrect attempts there are.
Your program will now keep a track of the user’s attempts. Users will not be allowed to enter the same guess again. At this stage, you will not be recording how many incorrect attempts they have made e.g Word to Guess: _ _ _ _ B _ L L Attempts: R T B L
Your program will now record the number of incorrect attempts and draw the snowman based on the number of incorrect attempts. The game will end when the snowman has been fully built.
You will modify your program to give the user more attempts. This will require more than 4 different versions of the snowman e.g if you give the user 6 attempts, you will need to break the snowman into 6 different parts instead of 4.