am trying to use file.write() to write the results of a score-calculating program into a file named Score.txt but when it is run the file is left blank, How can I find where a text file is being created or specify the path it should take to write the text file?
The file is stored in the same folder as the text file I am trying to edit f= open("Score.txt", "a")
country = input('what country?
')
gold = int(input('how many gold medals does the country have?
'))
gold=gold*3
silver =int(input('how many silver medals does the country have?
'))
silver=silver*2
bronze = int(input('how many bronze medals does the country have?
'))
total = gold + silver + bronze
total = str(total)
print(country, 'got', total)
f.write('
')
f.write(country)
f.write('
')
f.write('
=
')
f.write('
')
f.write(total)
f.write('
')
f.write('test')
f.close()