A brief description of the game of hangman

Assignment Help Computer Engineering
Reference no: EM132150388

Task

Your task is to implement the Hangman game in Python. Before implementing the game, please play the game on the website mentioned above. It will help you understand the project.

Project Specifications:

1) Output a brief description of the game of hangman and how to play.

2) Ask the user to enter the word or phrase that will be guessed (have a friend enter the phrase for you if you want to be surprised). Error check: repeatedly ask for a word or phrase until the input is letters and spaces.

3) Output the appropriate number of dashes and spaces to represent the phrase. Dashes are placeholders for letters.

4) Continuously read guesses of a letter from the user and replace the corresponding dashes if the letter is in the word (replace all occurrences, upper and lower case, of the letter), otherwise report that the user has made an incorrect guess.

Error check: only accept letters and spaces. An incorrect guess is counted as a guess, but a guess that is not letters and spaces is not counted as a guess. If a guess is more than one letter, it is assumed to be a guess of the whole phrase: if the match is perfect (independent of case), the game is won; if not, the game is over as a loss.

5) Each turn you will display the phrase as dashes but with any already-guessed letters filled in, as well as which letters have been incorrectly guessed so far and how many guesses the user has remaining.

Case of original input must be preserved, e.g. an upper-case letter in word/phrase must always be displayed in upper case even if the user guessed using a lower-case letter.

6) Your program should allow the user to make a total of k=6 guesses. After the 6th guess, the game is either won with a correct guess or the game ends as a loss.

7) One run of the program plays the game once. Do not have a loop to restart the game.

Assignment Notes:

1. Simplify: a. Leave error checking to last.

b. Write your first version to handle a single word (not a phrase of multiple words).

2. To clarify the project specifications, sample output is appended to the end of this document.

3. You may not use advanced data structures such as lists, sets, or dictionaries.

4. Items 1-7 of the Coding Standard will be enforced for this project.

5. Review the syllabus with respect to collaboration. What you hand in must be your own work.

Among other things, note this one: "If you show your code to another student, you are almost guaranteed a zero because most novice programmers will not be able to think of another way to do it and end up copying your code or sharing it with someone else who copies it."

Reference no: EM132150388

Questions Cloud

Create a row vector samplesi that contains exactly 9 : Create a row vector samples2 that contains points spaced exactly 0.2 units apart over the range of 0 to 1.95, incrementing from 0.
Discuss on the possible factors such as linux services : Desktop publishing package and The Gimp is an excellent image manipulation tool with a wide range of capabilities.
Calculate a students gpa for a number of classes : Calculate the GPA as the total number of "points" divided by the total credit hours.
What is the probability that a randomly selected recruit : What is the probability that a randomly selected recruit improved by more than 10 push-ups?
A brief description of the game of hangman : Your task is to implement the Hangman game in Python. Before implementing the game, please play the game on the website mentioned above.
What is the probability that the travel time : 1) Let Z be a standard normal random variable with mean = 0 and standard deviation = 1. Us the normal table to find the following answers.
Construct the probability distribution for x : Construct the probability distribution for X. Construct the corresponding probability histogram. (How do I get probability of each one?)
Find the probability that it is a drama or comedy : 160 horrors, 242 drama, 114 mystery, 308 romance, and 134 comedy. If a person selects a movie to rent, find the probability that it is a drama or comedy.
Create a threaded class that races by counting numbers : Your task in this assignment is to create a threaded class that "races" by counting and displaying the numbers from 1 to 10.

Reviews

Write a Review

Computer Engineering Questions & Answers

  Mathematics in computing

Binary search tree, and postorder and preorder traversal Determine the shortest path in Graph

  Ict governance

ICT is defined as the term of Information and communication technologies, it is diverse set of technical tools and resources used by the government agencies to communicate and produce, circulate, store, and manage all information.

  Implementation of memory management

Assignment covers the following eight topics and explore the implementation of memory management, processes and threads.

  Realize business and organizational data storage

Realize business and organizational data storage and fast access times are much more important than they have ever been. Compare and contrast magnetic tapes, magnetic disks, optical discs

  What is the protocol overhead

What are the advantages of using a compiled language over an interpreted one? Under what circumstances would you select to use an interpreted language?

  Implementation of memory management

Paper describes about memory management. How memory is used in executing programs and its critical support for applications.

  Define open and closed loop control systems

Define open and closed loop cotrol systems.Explain difference between time varying and time invariant control system wth suitable example.

  Prepare a proposal to deploy windows server

Prepare a proposal to deploy Windows Server onto an existing network based on the provided scenario.

  Security policy document project

Analyze security requirements and develop a security policy

  Write a procedure that produces independent stack objects

Write a procedure (make-stack) that produces independent stack objects, using a message-passing style, e.g.

  Define a suitable functional unit

Define a suitable functional unit for a comparative study between two different types of paint.

  Calculate yield to maturity and bond prices

Calculate yield to maturity (YTM) and bond prices

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd