~callum/hangman

84584eba0a36ae9527e715e60d9ebcb633c4bfe6 — ccejbc 6 years ago 18c9767
you can now enter your own words
1 files changed, 4 insertions(+), 3 deletions(-)

M hangman.py
M hangman.py => hangman.py +4 -3
@@ 13,12 13,12 @@ def get_words():
    '''
    word_source = ""
    while word_source not in ["m", "p"]:
        word_source = input("Do you want to enter a list of words manually (m) or use preset words (p)?\n    Please enter 'm' or 'p': ")
        word_source = input("\n\nDo you want to enter a list of words manually (m) or use preset words (p)?\n    Please enter 'm' or 'p': ")
    if word_source == "p":
        return open("words.txt").read().splitlines()
    else:
        print("not working at the moment so i'll give you some presets")
        return open("words.txt").read().splitlines()
        words_string = input("\nEnter words seperated by a space (' '):  ")
        return words_string.split()


def new_word():


@@ 28,6 28,7 @@ def new_word():
    global words
    word = random.choice(words)
    words.remove(word)
    print(word)
    return word.lower()