CSCI 107 Assignment 9
- Due Date: Monday, December 5th no later than 11:59 p.m.
- Partner Information: You may complete this assignment individually
or with exactly one classmate.
- Submission Instructions (working alone): Upload your solution,
renamed YourFirstName-YourLastName-Assignment9.py to the
BrightSpace Assignment 9 Dropbox.
- Submission Instructions (working with one classmate): Upload your
solution, entitled
YourFirstName-YourLastName-PartnerFirstName-PartnerLastName-Assignment9.py
to the BrightSpace Assignment 9 Dropbox. Note: If you work with a
partner, only one person needs to submit a solution. If you both
submit a solution, the submission that will be graded is the one from
the partner whose last name comes alphabetically first.
- Deadline Reminder: Once the submission deadline passes, BrightSpace
will no longer accept your submission and you will no longer be able
to earn credit. Thus, if you are not able to fully complete the
assignment, submit whatever you have before the deadline so that
partial credit can be earned.
Introduction
In this assignment, you will use your knowledge of Python strings
to implement a simple word guess game. The game works as follows.
First, the program identifies a
random word from a list of possible lowercase words for the user to guess.
Then, the user repeatedly guesses letters that might be in that word
until either the user makes 6 errors or the user figures out the word.
In this sample transcript, the game is played
three times. In each game in the transcript, the winning word is "rattata".
(However, the winning word can be anything.)
Notice that it doesn't matter whether the user enters lowercase or
uppercase letters. Also notice that once the user guesses a letter
successfully (for example, "R"), subsequent guesses of that same letter
are counted as errors since no new information is gained.
Use assignment9.py, renamed according
to the instructions above, as your starting point.
Use the main function without modifying it. You are welcome to
change the words that can be generated in the generate_word function.
Requirements and Grading - 100 points
- 15 points. The game works correctly when the user
makes no errors. (All or nothing.)
- 15 points. The game works correctly when the user
only makes errors. (All or nothing.)
- 15 points. The game works correctly when the user makes
five errors, but solves the problem. (All or nothing.)
- 15 points. The game works correctly when the user
figures out every letter in the word except one before
making six errors. (All or nothing.)
- 15 points. The output format is matched exactly. (3 points
per type of difference up to 10 points.)
- 10 points. Appropriate comments are included throughout
the solution. (3 points per missing comment up to
10 points.)
- 15 points. The solution is easy to understand and of
high quality. (5 points per type of improvement up to
15 points.)
Optional Challenge
Once your text-based solution works,
also display the letters guessed and whatever is known about
the word being guessed in a turtle graphics window.
If your solution is largely correct and you do a good job with
the optional challenge, you will automatically
score 100 on this assignment.