Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

LoveMathFermat

  • 3 years ago

Hi fellow OCW student, I have one more question about the hangman game. http://pastebin.com/gkKuk53f Here is my code. I'm trying to write a function that goes through available letters and return a value if it wasn't used before or re-ask to input a value if it was used before. Are there any suggestions ? The longer function is my main body.

  • This Question is Closed
  1. rsmith6559
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    You could make a list of guessed letters, and check to see if the current guess is not in that list.

  2. bwCA
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 1

    ask the question in the function http://dpaste.com/999240/

  3. JonnyTruelove
    • 3 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    That's your code? You DO realize that hangman is going to require a pellet ton more work than that. That's not even scratching the surface. Go to the invent with python (I think[it could be another one like think python or think like a computer scientist]) hangman its got all the source and explains everything.

  4. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy