Skip to content

Commit 11f225a

Browse files
style: format code with autopep8
Format code with autopep8 This commit fixes the style issues introduced in 3c8dcf3 according to the output from Autopep8. Details: None
1 parent 4242935 commit 11f225a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

Guess the Word Game/GuesstheWordGame.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
import random
22

3+
34
def choose_random_word():
4-
words = ["apple", "banana", "cherry", "grape", "orange", "watermelon", "kiwi", "mango"]
5+
words = ["apple", "banana", "cherry", "grape",
6+
"orange", "watermelon", "kiwi", "mango"]
57
return random.choice(words)
68

9+
710
def display_word(word, guessed_letters):
811
display = ""
912
for letter in word:
@@ -13,6 +16,7 @@ def display_word(word, guessed_letters):
1316
display += "_"
1417
return display
1518

19+
1620
def guess_the_word():
1721
print("Welcome to Guess the Word game!")
1822
secret_word = choose_random_word()
@@ -49,5 +53,6 @@ def guess_the_word():
4953
print("Game over! You ran out of attempts.")
5054
print(f"The word was: {secret_word}")
5155

56+
5257
if __name__ == "__main__":
5358
guess_the_word()

0 commit comments

Comments
 (0)