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 32
32
"THINK OUTSIDE THE BOX"
33
33
]
34
34
35
+
35
36
def generate_message ():
36
37
return random .choice (messages )
37
38
39
+
38
40
def play_game ():
39
41
player_name = input ("Enter your name: " )
40
42
print (f"Welcome, { player_name } , to the Cryptic Language Puzzle Game!" )
@@ -46,9 +48,9 @@ def play_game():
46
48
encrypted_message = generate_message ()
47
49
print ("Decipher the following message:" )
48
50
print (encrypted_message )
49
-
51
+
50
52
guess = input ("Enter your guess: " ).upper ()
51
-
53
+
52
54
if guess == encrypted_message :
53
55
score += 1
54
56
print ("Congratulations! You deciphered the message." )
@@ -62,5 +64,6 @@ def play_game():
62
64
print (f"Final Score: { score } " )
63
65
break
64
66
67
+
65
68
if __name__ == "__main__" :
66
69
play_game ()
You can’t perform that action at this time.
0 commit comments