By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,275 Members | 1,308 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,275 IT Pros & Developers. It's quick & easy.

NO programming experience at all in need of help - Hangman game

P: 1
I have never done any programming in my life but I have decided to go into engineering and in doing so we have to take this intro to programming course and I am pretty clueless. I am starting to get the hang of how python works but to put my thoughts into the program to make it run is the confusing part for me.

The task is to implement a Hangman game and the Program Specifications are:

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)
3) Output the appropriate number of dashes and spaces to represent the phrase (make sure
itís clear how many letters are in each word and how many words there are)
4) Continuously read guesses of a letter from the user and fill in the corresponding blanks if
the letter is in the word, otherwise report that the user has made an incorrect guess.
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.
6) Your program should allow the user to make a total of k=6 guesses.
7) You MUST use at least 3 string methods or operators in a useful manner (several
examples that I used are given in the notes below). If you wish to use lists in your project
that is fine, as long as you meet this requirement.

I am willing to learn and put as much effort as needed I really want to understand. Any help would greatly be appreciated.
Sep 18 '08 #1
Share this Question
Share on Google+
5 Replies


YarrOfDoom
Expert 100+
P: 1,247
Could you post what you already have?(code so far, pseudocode, logics scheme,...) It would be easier to help you out with it then.

edit: I see you're new here, so welcome to Bytes, don't forget to use [code]-tags and please read the Posting Guidelines . Enjoy the site!
Sep 19 '08 #2

Expert 100+
P: 671
If you look at your assignment, itís been broken down into tasks, and you should do them in order. The first task, for example, asks you to output something. I presume you had some class lectures, and you were actually shown how to output something in Python. If youíre having trouble even with that much, you may want to go to office hours, a session with the teaching assistant or the like. At a certain point, what you need is a full out tutoring session, not a single question answered.
Sep 20 '08 #3

P: 58
Wow, that looks interesting, i want to see the final work.
i sniffed around and didn't find any articles related to limiting the text input or any
other shortcut i can find on the internet, because you obviously don't want to learn
it as a long lecture from a teacher and you want to get the straight and in-to-the-point version of it, the best i can do is to tell you to go get a book about it.
you can see this post http://bytes.com/forum/thread838830.html
for some book suggestions.
Hope you will make it :D
Sep 26 '08 #4

P: 10
I have seen similar problem (or say same) problem at MIT OCW course assignment.

here is the link of course and check assignment # 3 and 4.

http://ocw.mit.edu/OcwWeb/Electrical...ents/index.htm

It contains helper functions and approach to solve this puzzle. I was able to do 1st part with success (asg # 3)...

hope this will help you ...
Sep 26 '08 #5

bvdet
Expert Mod 2.5K+
P: 2,851
There are a few other threads on hangman. Here's one that has some code in it:
Hangman
Sep 26 '08 #6

Post your reply

Sign in to post your reply or Sign up for a free account.