Output a brief description of the game of hangman

Assignment Help Python Programming
Reference no: EM132101125

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.

Reference no: EM132101125

Questions Cloud

Determining the highest present value : May has just won a lottery, which offers a choice in how she may receive her prize. If the interest rate is 10% per annum,
What is the value of stock today : What is the value of this stock today if the required return is 14%?
Activities and ways of conducting business : How should a company alter its activities and ways of conducting business to align with this fundamental change?
Explain what action learning sets : Explain what action learning sets are and how they work. Provide two examples of how action learning sets could be used.
Output a brief description of the game of hangman : Output the appropriate number of dashes and spaces to represent the phrase. Dashes are placeholders for letters.
Service mean for the customer and the business : What does excellent customer service mean for the customer and the business.
Create a version of the dice game pig that a user can play : Create a version of the dice game Pig that a user can play against the computer. The object of the game is to be the first to score 100 points.
Write notes describing frame shift mutations : Write notes describing why frame shift mutations tend to produce more serious consequences than substitution mutations
Examine the behaviour of the mpk : The marginal product of capital is given by a Y/K. Setting TFP and L 1, examine the behaviour of the MPK as it varies between 0.3 and 1.

Reviews

Write a Review

Python Programming Questions & Answers

  Build a menu-driven application

Build a menu-driven application that will allow a user to maintain their collections. For example, I might have a coin collection, or a record collection, or a collection of all my valuable items.

  Construction of the data dictionary

A first systematic step to a data science process, as we have learned from the lectures and practical sessions, is to construct a data dictionary for the dataset.

  Develop python script that will implement the given command

Write a python script that will implement the following command: merge sourcedirectory1 sourcedirectory2 destinationdirectory

  Write recursive function to and the lcs of two input string

Assignment: Introduction to Computer Science for Life Scientists. Write a recursive function to and the LCS of two input string of size n and m.

  Create a dictionary from the boys txt file

Create a dictionary from the boys.txt file that uses the boys' names as the key and the number of boys that were named that name as the value.

  Develop a list of requirements that could have been used

Develop a list of requirements that could have been used to create the original file.py (specify requirements in any format you desire) as written.

  Write a python program that generates a small web site

ICT112 Assignment. Your task in this assignment is to write a Python program that generates a small web site to inform Sunshine Coast people about some aspect of the local environment or a local sustainability issue

  Write a function named digit_count that takes one parameter

Write a function named digit_count that takes one parameter that is a number (int or float) and returns a count of even digits, a count of odd digits.

  Implement a class called countrycatalogue

Implement a class called CountryCatalogue. Implement a class Country that holds the information about a single country; name the file country.py.

  Write a simple address book that lets save contact details

159.171 - Computational Thinking and Software Development Assignment. MASSEY UNIVERSITY. Write a simple address book that lets save contact details

  Write python script that reads child mortality data

ICT702 Task - Theme: Child Mortality.In this first part of Task, you should write a Python script that reads and analyses the child mortality data file

  Implement the triangle classification algorithm

Create a function that implements the Triangle Classification Algorithm. The algorithm has a lot of steps in it, but each step is simple.

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