- Specification: The first version should start with the puzzle filled in entirely except for the first letter. The player only has a single guess. The number of guesses remaining is not displayed when the user is prompted for a guess. The updated puzzle (with filled-in and/or missing letters) is not displayed after the player’s guess. If the player correctly guesses the letter in the word the program displays a congratulatory message with the correct word, otherwise it displays a failure message with the same correct word.
- Screenshots
- Design:
- Make a copy of the Description Template, Functional Tests TemplateandTemplate Window Algorithm in your own Google docs folder and edit the copies as your first version design documents.
- The Description must contain a description of the complete game, with phrases that apply to version 1 bolded and underlined and the phrases that will not be implemented in Version 1, not bolded and not underlined.
- You might findExemplarGraphics-1andExemplarGraphics-2helpful as examples for this version.
- Do not use any user-defined functions, except for main, in this version.
- The algorithm must include at least 2 blocks in addition to the open window and end game blocks.
- The algorithm must use a selection control structure to report the game result.
- Software Quality: Apply sections 1- 4 (ignore 2.4, and 4.3) of the Software Quality Teststo this version.
- Code: Make a copy of the program ExemplarGraphics-1 (Viewable). Open the Wing IDE and create a new empty program. Then copy the code and paste it into the Wing IDE program window and edit it to become your game code. Alternately, you can download ExemplarGraphics-1 (Downloadable)to your VM or lab computer and edit it to become your game code.
- Reflection: Make a copy of the Version 1 Reflection Activity and edit the copy as your reflection document in your own Google Docs folder. You will need this document to show to your TA during the Demo Code / Reflection process.
- Hints:
- For testing purposes, you may use the following list of words :
list_of_words = [‘apple’,’banana’,’watermelon’,’kiwi’,’pineapple’,’mango’].
Please note your program should also work for any list similar to the given list.
- The word to be guessed is chosen randomly from the list. In order to choose a word randomly from the list, you can look into documentation for random modulefor an appropriate function.
- You may want to look at string slicing in order to complete this version. Here is an example of how to slice a string:
Let’s say we want to extract the course number from the string
course=’CMPUT 174′
one way to do it would be to write the following string slicing statement:
course_number=course[6:].