From 1c9ae72f821906cd3596e08868ff920cd7f7b615 Mon Sep 17 00:00:00 2001 From: Andrew D Kirch Date: Tue, 19 Sep 2017 16:43:35 -0400 Subject: [PATCH] fix various PEP-8 Style issues --- python_ex239.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/python_ex239.py b/python_ex239.py index 2955556..cc2129c 100644 --- a/python_ex239.py +++ b/python_ex239.py @@ -8,13 +8,13 @@ def hangman(word): wrong = 0 stages = ["", - "________ ", - "| ", - "| | ", - "| 0 ", - "| /|\ ", - "| / \ ", - "| " + "________ ", + "| ", + "| | ", + "| 0 ", + "| /|\ ", + "| / \ ", + "| " ] rletters = list(word) board = ["__"] * len(word) @@ -26,7 +26,7 @@ def hangman(word): char = input(msg) if char in rletters: cind = rletters \ - .index(char) + .index(char) board[cind] = char rletters[cind] = '$' else: @@ -42,9 +42,11 @@ def hangman(word): break if not win: print("\n" - .join(stages[0: \ - wrong])) + .join(stages[0: + wrong])) print("You lose! It was {}." .format(word)) + hangman("cat") +