forked from tunapanda/Python-advance-tracks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbank.py
executable file
·41 lines (33 loc) · 1.54 KB
/
bank.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
"""
You have just started working at a bank, and you discover that they aren't using any computers to keep track of their
customers!
Create some Python classes that will keep track of your customers.
Each customer should have a first and second name, as well as an ID number (4 digits). They also have the option to deposit
money when they open the account (default amount to start is 0 for most customers)
All customers can get their balance for free
There should also be methods in your classes for depositing and withdrawing. See the rules for the different customers below.
Your bank has 3 types of customers:
Regular - no minimum balance, starting balance is whatever they put in at the beginning. Charged 50 kes withdrawal fee.
Preferred - Must maintain a minimum balance of 10000 kes, not charged a withdrawl fee.
Student - No minimum balance, no withdrawal fee, but can only withdraw 500 kes at a time.
If a customer tries to withdraw more than is in his/her account, goes below the minimum balance,
or if a student tries to withdraw more than 500kes, print out an error message.
"""
class customerTracker:
def __init__(self):
self.records = {}
def regester(self):
self.idNo = 0
self.firstName = raw_input("First Name: ")
self.secondName = raw_input("Second Name: ")
self.name = self.firstName,self.secondName
if self.records.has_key(self.name) == False:
self.records[self.name] = str(self.idNo+1).zfill(4)
print self.records
self.idNo +=1
def deposit(self):
pass
def withdraw(self):
pass
bank = customerTracker()
bank.regester()