User Profile

Collapse

Profile Sidebar

Collapse
stcooperr
stcooperr
Last Activity: Feb 8 '14, 10:45 AM
Joined: Jan 19 '14
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • stcooperr
    replied to write a Hangman game
    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 = "*"
    ...
    See more | Go to post

    Leave a comment:


  • stcooperr
    replied to write a Hangman game
    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 "   ------|"
    ...
    See more | Go to post
    Last edited by stcooperr; Jan 19 '14, 11:02 AM. Reason: it mucked up on the paste

    Leave a comment:

No activity results to display
Show More
Working...