Hi fellow OCW student,
I have one more question about the hangman game.
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.
MIT 6.00 Intro Computer Science (OCW)
I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga.
Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus.
Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
You could make a list of guessed letters, and check to see if the current guess is not in that list.
ask the question in the function
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.