The assignments will be graded out of 100 points. Create a text document entitled answers.xxx (where you replace xxx with whatever extension is appropriate, depending on the file format you use). Acceptable file formats are plain text, Word document, OpenOffice document, and PDF. Put your name and UTA ID at the top. Your answers that are not part of a program will be added to this file. Each task below will instruct you where to put your answers.
You will be programming the game called hangman. If you are unfamiliar with the game, you can read about it here. In our version of the game, three play modes are supported:
The computer will handle the play and the answers once the first user has chosen the word. The second player loses if they guess six times a letter that does not appear in the word.
After selection of one of the modes of play, and after a word has been picked as described above, your program should work as follows:
This is the hangman graphic. Yours does not have to be exactly the same.
For 0 incorrect guesses:________ |For 1 incorrect guesses:
________ | OFor 2 incorrect guesses:
________ | O /|\For 3 incorrect guesses:
________ | O /|\ / | \For 4 incorrect guesses:
________ | O /|\ / | \ / \For 5 incorrect guesses:
________ | O /|\ / | \ / \ _/ \_For six incorrect guesses, print
YOU LOST, THE GAME IS OVER!
In your answers.xxx file, design all functions you use and specify their inputs and outputs. Again, remember that this is NOT the place to describe HOW a function will be implemented.
Implement your functions and save them in hangman_functions.py.
Write a program named hangman_tests.py that tests your individual functions with test cases you deem
interesting. The strings, lists, or any other data structures you need to test your functions do not
need to come from prompting the user. You can hard code anything you'd like. For example, if you had a
display_hangman(errors)
function and you were testing various numbers of errors, you do not
need to get these from the user.
Write a main program, named hangman.py that uses your functions to allow a user to play hangman.
Pay close attention to all specifications on this page, including file names and submission format. Even in cases where the program works correctly, points will be taken off for non-compliance with the instructions given on this page (such as wrong file names, wrong compression format for the submitted code, and so on). The reason is that non-compliance with the instructions makes the grading process significantly (and unnecessarily) more time consuming. Contact the instructor or TA if you have any questions.
The assignment should be submitted via Blackboard. Submit a ZIPPED directory called assignment8.zip (no other forms of compression accepted, contact the instructor or TA if you do not know how to produce .zip files). The zipped directory should contain your answers.xxx document and all the Python code files.