This is the game I have created. It should add a new score to the file, but instead it just overwrites it, and I don't know how how to fix it.
input("HIT ENTER WHEN YOU ARE READY")
#Makes the while Statment repeating it selve
c= True
#Repeating it selve
while c == True:
import time
One = time.time()
a=input("Type as fast the alphabet (Either Caps or all small letters!): ")
b= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
d= 'abcdefghijklmnopqrstuvwxyz'
if a == b or a == d:
Two = time.time()
difference = int(Two - One)
print("Well done your time is",difference,"seconds")
c = False
else:
print('Arg Wrong the time is still running!')
a=input(" ")
C = True
#Writes the sore to a file
"Score.txt"
def writeToFile():
global myFile
difference = str(difference)
myFile = open("Score.txt","w")
myFile.write(difference + '\n')
myFile.close()