Re: Struggling with program

2013-02-18 Thread Jean-Michel Pichavant
> So your assignment is a bit misleading when it says a constructor is > not > required, because if you want to initialize some instance attributes, > it > has to be done in a method, usually the constructor, which in Python > is > __init__. By constructor, he may actually refer to the __new__ met

Re: Struggling with program

2013-02-18 Thread Jean-Michel Pichavant
- Original Message - > I'm trying to do this assignment and it not working, I don't > understand why... > > This is what I have to do: > > Write the definition of a class Player containing: > An instance variable name of type String , initialized to the empty > String. > An instance va

Re: Struggling with program

2013-02-17 Thread Chris Angelico
On Mon, Feb 18, 2013 at 1:29 PM, maiden129 wrote: > Write the definition of a class Player containing: > An instance variable name of type String , initialized to the empty String. > An instance variable score of type int , initialized to zero. > A method called set_name that has one paramet

Re: Struggling with program

2013-02-17 Thread Michael Torrie
On 02/17/2013 07:29 PM, maiden129 wrote: > I'm trying to do this assignment and it not working, I don't > understand why... > > This is what I have to do: > > Write the definition of a class Player containing: An instance > variable name of type String , initialized to the empty String. An > i

Re: Struggling with program

2013-02-17 Thread Dave Angel
On 02/17/2013 09:29 PM, maiden129 wrote: First question: What version of Python are you writing this for? Version 2.x has slightly different rules than version 3.x I'm trying to do this assignment and it not working, I don't understand why... Define "working." Do you mean you get a synt

Struggling with program

2013-02-17 Thread maiden129
I'm trying to do this assignment and it not working, I don't understand why... This is what I have to do: Write the definition of a class Player containing: An instance variable name of type String , initialized to the empty String. An instance variable score of type int , initialized to ze