On 30/11/16 02:29, Parish Watteau wrote:
>         A program that will read each player’s name and golf score as
> keyboard input, and then save these as records in a file named golf.txt.
> (Each record will have a field for the player’s name and a field for the
> player’s score.)
> 
> I attempted to solve it but ran into some errors from using some methods
> from a different python version but it didn't turn out the right way. 

OK, that tells us almost nothing.
Be specific.

What errors did you get?
Cut 'n paste the entire error message into your email.

Which particular methods were you using that gave problems?
What problems?

Which Python version are you using (and which OS)?

What does "it didn't turn out" mean?
What happened? What did you expect to happen?

> am stuck without a program and no where to start. 

Start with the basic problem and build up:

Can you write code that reads a player's name and prints it on screen?
Can you write code that reads a player's score and prints it on screen?
Can you write a program that does both of the above.
Can you write a program that reads say, 5 name and score pairs, printing
as it goes?
Can you write a program that repeatedly reads name and score pairs,
printing as it goes, until some end condition is reached  (an empty name
say)?

Can you write a program that writes a string to a
text file called 'golf.txt'?
Can you write a program that writes two strings to
a text file called 'golf.txt'?

Once you can do all of the above part-solutions you
just need to combine them.

Now tell us again what your specific problem is and we'll
try to help you out. But be as specific as you can, the more
detail you provide the easier it is for us to give you
specific answers.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos


_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to