You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def__init__(self, balance_arg=0, intrest_rate_arg=.001): #positional arguments. a method. a more flexable way to do it
3
+
self.balance=balance_arg#balance_arg are local varable
4
+
self.intrest_rate=intrest_rate_arg
5
+
self.transactions= []
6
+
7
+
8
+
# def __init__(self): #positional arguments. a method
9
+
# self.balance = 0 one way to do it
10
+
# self.intrest_rate = .001
11
+
12
+
defcheck_balance(self): # going into self to retrieve balance from what you have
13
+
returnself.balance#Returning is used to return a value from a function and exit the function. To return a value from a function, use the return keyword. and print means display a value dont think it'll exit the function
0 commit comments