File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Cryptic Language Puzzle Game Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 3232 "THINK OUTSIDE THE BOX"
3333]
3434
35+
3536def generate_message ():
3637 return random .choice (messages )
3738
39+
3840def play_game ():
3941 player_name = input ("Enter your name: " )
4042 print (f"Welcome, { player_name } , to the Cryptic Language Puzzle Game!" )
@@ -46,9 +48,9 @@ def play_game():
4648 encrypted_message = generate_message ()
4749 print ("Decipher the following message:" )
4850 print (encrypted_message )
49-
51+
5052 guess = input ("Enter your guess: " ).upper ()
51-
53+
5254 if guess == encrypted_message :
5355 score += 1
5456 print ("Congratulations! You deciphered the message." )
@@ -62,5 +64,6 @@ def play_game():
6264 print (f"Final Score: { score } " )
6365 break
6466
67+
6568if __name__ == "__main__" :
6669 play_game ()
You can’t perform that action at this time.
0 commit comments