A brief description of the game of hangman

Assignment Help JAVA Programming
Reference no: EM132101157

PLEASE USE PYTHON SPYDER

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 indenting can be confusing so if you can use a code to copy of a screenshot that would help!

Reference no: EM132101157

Questions Cloud

Assess and improve ability to reason : What is the standards for critical thinking use to assess and improve your ability to reason.
Create an if statement that is unconditionally true : Write short Java statements to complete each of the following tasks: Test whether variable x is less than 5. If it is, print "x is less than 5".
What is the average unit cost of the order : Suppose Company X decides to buy 8,000 units from Supplier A. What is the average unit cost of the order?
Employee selection process : Discuss the Vision into Performance Model and how it relates to the employee selection process?
A brief description of the game of hangman : 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.
Making a product or delivering a service : Prices should reflect the value that consumers are willing to pay versus Prices should primarily just reflect
Create either a sub-function or an anonymous function : Create a primary function that returns the number of trials that give each of the distinct simulated sums of two dice rolls.
Advantages and disadvantages of the human resources : What would be advantages and disadvantages of the Human Resources department if they had individual strategies
Services of intermediaries : Why do most people use the services of Intermediaries as opposed to direct finance?

Reviews

Write a Review

JAVA Programming Questions & Answers

  Design new software to keep track of people

Your local police department wants to design new software to keep track of people, property, and criminal activity. List at least three classes you think should be in the design. For each class, identify some data members and methods.

  How many years we think that animal should live

Every animal also has a life expectancy, which is how many years we think that animal should live. The following rules show how to determine the life expectancy

  Create a program called date java to perform

Create a program called Date.java to perform error-checking on the initial values, for instance: fields month, day, and year. Also, provide a method nextDay() to increment the day by one. The Date object should always remain in a consistent state.

  Write a class named java1306cmis141c801 that performs the

write a class named java1306cmis141c801 that performs the following actions.prompt the user for an int between lower

  Eligible for garbage collection

When is the B object, created in line 3, eligible for garbage collection - There is no way one can be absolutely certain.

  Assignment on computer memory hacking

Describe what hacking of memory or hacking of RAM means. Examine the common tools that hackers use to hack into memory of computing devices. Detail two (2) real-life examples of such tools in action.

  Determine the exact number of statements

CMPT 280- Intermediate Data Structures and Algoirthms - Determine the exact number of statements Express the function you obtained in part a) in big-Θ notation.

  Determine first and last dog

Determine first and last dog among them and print them. Do not simply sort the Dog data - A blank name should not be used to create an object. Using the compare

  Design greedy algorithm to solve activity selection problem

Write a program to implement the Boyer-Moore algorithm. Your program should ask the user to enter a text and a pattern, then output. Design a greedy algorithm to solve the activity selection problem.

  Your task is to design and implement a sorting

your task is to design and implement a sorting algorithmalgorithm that can sort nonnegative integers that fall within

  Write a java class that declares a named constant

Write a Java class that declares a named constant to hold the number of quarts in a gallon (4).

  Write a program that reads a number in feet

Write a program that reads a number in feet, converts it to meters, and displays the result. One foot is 0.305 meters. INPUT and PROMPTS.The program prompts for the feet with the message "Enter a value for feet:

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