From c785109db591301e07359ecc4c5d871cb7a0b8d9 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Thu, 10 Aug 2023 17:52:27 +0000 Subject: [PATCH] style: format code with autopep8 Format code with autopep8 This commit fixes the style issues introduced in f0cf66d according to the output from Autopep8. Details: None --- Cryptic Language Puzzle Game/cryptic_language_game.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Cryptic Language Puzzle Game/cryptic_language_game.py b/Cryptic Language Puzzle Game/cryptic_language_game.py index d266eb8192..92c9f59de6 100644 --- a/Cryptic Language Puzzle Game/cryptic_language_game.py +++ b/Cryptic Language Puzzle Game/cryptic_language_game.py @@ -32,9 +32,11 @@ "THINK OUTSIDE THE BOX" ] + def generate_message(): return random.choice(messages) + def play_game(): player_name = input("Enter your name: ") print(f"Welcome, {player_name}, to the Cryptic Language Puzzle Game!") @@ -46,9 +48,9 @@ def play_game(): encrypted_message = generate_message() print("Decipher the following message:") print(encrypted_message) - + guess = input("Enter your guess: ").upper() - + if guess == encrypted_message: score += 1 print("Congratulations! You deciphered the message.") @@ -62,5 +64,6 @@ def play_game(): print(f"Final Score: {score}") break + if __name__ == "__main__": play_game()