> [snip assignment]
> Please don't ask about homework in the future.  Did your professor 
> tell you to submit queries to this list?  If so, could you ask him 
> not to? it's against the policies of the tutor mailing list to give 
> homework help.

Thats a bit extreme. We don't mind giving help on specific queries
where an attempt has been made to do the work.
We will rarely give a direct answer but might ask questions or
make suggestions to lead you towards the answer.

What we will not do is accept a simple query saying, in effect,
"here is the assignment, how do I do it?"

>> This is where I am at so far.  I don't understand how to get the 
>> Account class into the program. Can you help a little,  Just 
>> looking for an idea or some guidance

Do you understand the difference between classes and objects?
Do you understand how to create an object, as opposed to a class?
Do you know how to call the methods of an object once created?

If not find almost any Python tutorial. They all answer those 
questions.

>> class Account:
>>      def __init__(self, initial):
>>          self.balance = initial
>>      def deposit(self, amt):
>>          self.balance = self.balance + amt
>>      def withdraw(self,amt):
>>          self.balance = self.balance - amt
>>      def getbalance(self):
>>          return self.balance
>>
> What you have there is a class, not an instance of a class.  read 
> more about the difference at 
> http://www.python.org/doc/2.2.3/tut/node11.html
> or some other tutorial site.

Seconded.

> Also, make it clear to your instructor that you had trouble here. 
> If he doesn't know what's hanging people up he won't be able to help 
> you with it.

But I think Luke is being a wee bit hard here, you clearly have
tried to solve it, you just need some direction. I'd say that was
within the tutor list rules.

Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld 


_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to