Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Sample Words: In this lab assignment, you are going to implement a word guessing game. The program shows a word missing a single character, and

image text in transcribed

image text in transcribed

Sample Words:

image text in transcribed

In this lab assignment, you are going to implement a word guessing game. The program shows a word missing a single character, and player must guess the word. The player can continue guessing the words till all the words in the file are exhausted. Requirements: Create a function called get_a_Word() to read lines from a text file (a sample file will be provided to you) the file is formatted with one word per line the program will select the words one by one from top to the bottom when called, this function will return the next word you will write your code assuming this file is in the same folder as your code and your file is named 'words.txt Create a function called guess_word() that takes the word returned by the get_a_Word) function and returns a guess word randomly select and replace a single character with a placeholder character. For example, the function takes the word 'Classroom' as a parameter, and outputs dl ssroom or_lassroom, etc. use the following function to replace a single character in your string: text- 'Apple text text[1:]

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Mining Concepts And Techniques

Authors: Jiawei Han, Micheline Kamber, Jian Pei

3rd Edition

0123814790, 9780123814791

More Books

Students also viewed these Databases questions

Question

15-5 How will MIS help my career?

Answered: 1 week ago