CSCI 107 Assignment 9


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

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.