Skip to content

format code with autopep8 #2950

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Cryptic Language Puzzle Game/cryptic_language_game.py
Original file line number Diff line number Diff line change
Expand Up @@ -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!")
Expand All @@ -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.")
Expand All @@ -62,5 +64,6 @@ def play_game():
print(f"Final Score: {score}")
break


if __name__ == "__main__":
play_game()