-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBanking2.py
53 lines (40 loc) · 1.54 KB
/
Banking2.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
42
43
44
45
46
47
48
49
50
51
52
53
# Instance variable = name, account, address ,accountNo
# instance method : CreateAccount( ) DisplayAccount()
# class variable = Bank_Name , ROI_On_FD
class BankAccount:
Bank_Name = "HDFC Bank PVT LTD"
ROI_On_FD = 6.7
def __init__(self):
self.Name = ""
self.Amount = 0.0
self.Address = ""
self.AccountNo = 0
def CreateAccount(self):
print("Enter your Name : ")
self.Name = input()
print("Enter your intial Amount : ")
self.Amount = float(input())
print("Enter your Addresss : ")
self.Address = input()
print("Enter your Account Number : ")
self.AccountNo = int(input())
def DisplayAccountInfo(self):
print("\n______________your Account Information is below______________\n")
print("Name of Account Holder : ",self.Name)
print("Account Number : ", self.AccountNo)
print("Address of Account Holder : ",self.Address)
print("Current Amount in Account : ",self.Amount)
print("\n__________________Thank You___________________\n")
def main():
print("Name of Bank : ",BankAccount.Bank_Name)
print("Rate of Intrest on Fixed Desposite : ",BankAccount.ROI_On_FD)
Customer1 = BankAccount()
Customer2 = BankAccount()
print("Account no 1 ")
Customer1.CreateAccount()
print("Account no 2")
Customer2.CreateAccount()
Customer1.DisplayAccountInfo()
Customer2.DisplayAccountInfo()
if __name__ == "__main__":
main()