[LUNA] Python question

Michael W. Hall hallmw at att.net
Mon Oct 17 21:16:03 CDT 2016


Yep. Not really a good example I can find.

On Mon, 2016-10-17 at 21:01 -0500, Chris Brightwell wrote:
> Did you try googling the error?
> 
> > 
> > On Oct 17, 2016, at 8:47 PM, Michael W. Hall <hallmw at att.net>
> > wrote:
> > 
> > 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?
> > _______________________________________________
> > LUNA mailing list
> > LUNA at lunagroup.us
> > http://lunagroup.us/mailman/listinfo/luna
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://lunagroup.us/pipermail/luna/attachments/20161017/e793e5c
> 2/attachment.html>
> _______________________________________________
> LUNA mailing list
> LUNA at lunagroup.us
> http://lunagroup.us/mailman/listinfo/luna


More information about the LUNA mailing list