Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #106384 > unrolled thread
| Started by | Jason Friedman <jsf80238@gmail.com> |
|---|---|
| First post | 2016-04-03 11:37 -0600 |
| Last post | 2016-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.
Re: i cant seem to figure out the error Jason Friedman <jsf80238@gmail.com> - 2016-04-03 11:37 -0600
| From | Jason Friedman <jsf80238@gmail.com> |
|---|---|
| Date | 2016-04-03 11:37 -0600 |
| Subject | Re: 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
Back to top | Article view | comp.lang.python
csiph-web