> 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
- 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
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
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
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
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