Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #106384 > unrolled thread

Re: i cant seem to figure out the error

Started byJason Friedman <jsf80238@gmail.com>
First post2016-04-03 11:37 -0600
Last post2016-04-03 11:37 -0600
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: i cant seem to figure out the error Jason Friedman <jsf80238@gmail.com> - 2016-04-03 11:37 -0600

#106384 — Re: i cant seem to figure out the error

FromJason Friedman <jsf80238@gmail.com>
Date2016-04-03 11:37 -0600
SubjectRe: i cant seem to figure out the error
Message-ID<mailman.405.1459705037.28225.python-list@python.org>
>   def deposit(self, amount):
>     self.amount=amount
>     self.balance += amount
>     return self.balance
>
>
>   def withdraw(self, amount):
>     self.amount=amount
>     if(amount > self.balance):
>       return ("Amount greater than available balance.")
>     else:
>   self.balance -= amount
>     return self.balance

Also, this line is not needed in the deposit and withdraw methods:

self.amount=amount

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web