The text file should be created in the same directory that you are running your python script.
This is because you haven't changed the path of your f= open("Score.txt", "a")
You can also declare a relative path or absolute path to your Score.txt file.
Absolute path
open Score.txt from an absolute location
f = open(r"C:my_programsScore.txt","a")
Relative Path
open myFile from the parent directory of current python script.
f = open("../Score.txt","a")
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…