Content-Length: 307558 | pFad | http://github.com/unrealapex/python-programming/commit/d5c8c880f460292d3af9c14d2804a4b1a5126688

E1 use self · unrealapex/python-programming@d5c8c88 · GitHub
Skip to content

Commit d5c8c88

Browse files
committed
use self
1 parent f98bfce commit d5c8c88

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

lab-11/account.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ def __init__(self, id = 0, balance = 100, annual_interest_rate = 0):
33
self.__id = id
44
self.__balance = balance
55
self.annual_interest_rate = annual_interest_rate
6-
6+
77
def get_id(self):
88
return self.__id
9-
9+
1010
def set_id(self, new_id):
1111
self.__id = new_id
12-
12+
1313
def get_balance(self):
1414
return self.__balance
1515

@@ -18,16 +18,16 @@ def set_balance(self, new_balance):
1818

1919
def get_annual_interest_rate(self):
2020
return self.__annual_interest_rate
21-
21+
2222
def set_annual_interest_rate(self, new_annual_interest_rate):
2323
self.__annual_interest_rate = new_annual_interest_rate
2424

2525
def get_monthly_interest(self):
26-
self.__balance * (annual_interest_rate / 0.12)
27-
26+
self.__balance * (self.__annual_interest_rate / 0.12)
27+
2828
def get_monthly_interest_rate(self):
29-
return annual_interest_rate / 0.12
30-
29+
return self.__annual_interest_rate / 0.12
30+
3131
def withdraw(self, amount):
3232
self.__balance -= amount
3333

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/unrealapex/python-programming/commit/d5c8c880f460292d3af9c14d2804a4b1a5126688

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy