@ArnavPoddar/

Memory Game

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import time, random
Playermessup=False
memory=""
x=1
print ("Please memorize the following number(s). You will be asked to repeat them.")
time.sleep(5)
#Instructions
while Playermessup!=True:
  for i in range (x):
    number=str(random.randint(0,9))
    memory+=number
    print (memory)
    time.sleep(1.5)
    for a in range (100):
      print ()
  for n in range (100):
    print ()
  playerResponse=input("Please repeat the numbers printed.")
  if playerResponse==memory:
    print ("Good Job. Your score right now is " + str(x))
    time.sleep(3)
    for b in range (100):
      print ()
    time.sleep(0.2)
    memory=""
    x+=1
  else:
    print ("Your score was " + str(x))
    Playermessup=True