Ara Kooser wrote:
> def look(here):
> "Look around the place you are in"
> print here.description
This is technicaly OK but conventionally the first argument to a method
is 'self'. Since you are learning it would be good to keep to the
convention.
> outside1 = Area("Outside"
<[EMAIL PROTECTED]> wrote
> def look(here):
>"Look around the place you are in"
>print here.description
>
> Not sure if this works as is, I believe it depends on the
> interpreter, but
> it is customary to use the word self as the first parameter,
It is just a custom and 'here'
Eric Brunson wrote:
> Ara Kooser wrote:
>> Hello,
>> I read Alan Gauld's and How to Think Like a Computer Scientist
>> section on classes. So I tried to write a simple room class. My goal
>> is to write a short text adventure using classes. Here is the code:
>>
>> class Area:
>> def _init_(se
Ara Kooser wrote:
> Hello,
> I read Alan Gauld's and How to Think Like a Computer Scientist
> section on classes. So I tried to write a simple room class. My goal
> is to write a short text adventure using classes. Here is the code:
>
> class Area:
> def _init_(self, name, description):
>