[LUNA] Python question

Michael W. Hall hallmw at att.net
Mon Oct 17 20:47:19 CDT 2016


Trying to help a friend.  I am getting an error on the following
program.

global golf{}
name = ""
while name != 1:
	name = input("Golfer's name? ")
	score = input("Golfer's score? ")
	golf[name]=score

file = open("","w")

for key in golf:
	file.write(key, gofl[key])

file.close()

golf is supposed to be a dictionary, but I am getting an error on the
first line.

Any ideas?


More information about the LUNA mailing list