Here's a real quick n dirty solution using a different technique - involves breaking the strings apart and using the the position of characters to draw a map. No hangman drawn on this one but it's dead simple.
Code:
#alternative hangman (beta version without refinements)
#rwhile-cooper 08-02-14
word = "testword"
guesses = []
chances = 5
pos = 0
length = len(word)
word_mask = "*"
This is my beginner version using lists. Made me feel like a programming god. Done in version 2.7.5
Would welcome any comments, I think my solution is unusual at least.
Code:
#Hangman version 2 R J While-Cooper 19-01-14
#NEXT UPDATE WILL ALLOW PHRASES THAT INCLUDE A DELIMITER BETWEEN WORDS
#THE VARIOUS STAGES OF HANGMAN
def scaffold5():
print""
print " ------|"
Leave a comment: