> On 19/07/17 20:58, Daniel Bosah wrote:
don't see a lot of benefit to using pytz here... just my opinion. the
question does give a chance to annotate the example with some thoughts,
though; take them for what they're worth.
import datetime
import pytz
class Account:
"""Simple account class
On 19/07/17 20:58, Daniel Bosah wrote:
> class Account:
> def deposit(self,amount):
> if amount > 0:
> self.balance += amount
> self.show_balance()
>
> self.transaction_list.append(
> def withdrawl(self,amount):
> if 0 < amount <= self.balance
Daniel Bosah wrote:
> I'm learning about OOP programming in Python.
> This is my code from my online course.
>
> import datetime
> import pytz
> class Account:
> """Simple account class with balance"""
Why so many "s ? Use either one for single-line strings
"Simple account class wit
Daniel Bosah wrote:
> I'm learning about OOP programming in Python.
> This is my code from my online course.
>
> import datetime
> import pytz
> class Account:
> """Simple account class with balance"""
Why so many "s ? Use either one for single-line strings
"Simple account class wit
I'm learning about OOP programming in Python.
This is my code from my online course.
import datetime
import pytz
class Account:
"""Simple account class with balance"""
def __init__(self,name,balance):
self.name = name
self.balance = balance
self.transaction_