-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBanking5.py
More file actions
92 lines (67 loc) · 2.69 KB
/
Banking5.py
File metadata and controls
92 lines (67 loc) · 2.69 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# Instance variable : Name, Amount, Address, AccountNo
# Instance method : CreateAccount(), DisplayAccountInfo()
# Class variable : Bank_Name ,ROI_On_FD
# Class method : DisplayBankInformation
# Static method : DisplayKYCInfo
class Bank_Account:
Bank_Name = "HDFC bank PVT LTD"
ROI_On_FD = 6.7
def __init__(self):
self.Name = ""
self.Amount = 0
self.Address = ""
self.AccountNo = 0
def CreateAccount(self):
print("Enter your name : ")
self.Name = input()
print("Enter your intial amount : ")
self.Amount = int(input())
print("Enter your Address : ")
self.Address = input()
print("Enter your Account Number : ")
self.AccountNo = int(input())
def DisplayAccountInfo(self):
print("-------- Your Account informartion is as below --------")
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)
@classmethod
def DisplayBankInformation(cls):
print("Welcome to banking console")
print("Name of our bank is : ",cls.Bank_Name)
print("Rate of intrest we offer on fixed deposite is : ",cls.ROI_On_FD)
@staticmethod
def DisplayKYCInfo():
print("Please consider below KYC information")
print("According to the rules of Goverment of India you have to submit below documnets")
print("1 : Clear and recent passport size photo")
print("2 : Photo of aadhar card")
print("3 : Photo of PAN card")
def Deposit(self,value):
self.Amount = self.Amount + value
def Withdraw(self,value):
self.Amount = self.Amount - value
def main():
Bank_Account.DisplayKYCInfo()
print("Name of bank : ",Bank_Account.Bank_Name)
print("Rate of Intrest on Fixed deposit : ",Bank_Account.ROI_On_FD)
Bank_Account.DisplayBankInformation()
User1 = Bank_Account()
User2 = Bank_Account()
print("Createing the first account")
User1.CreateAccount()
print("Createing the second account")
User2.CreateAccount()
User1.DisplayAccountInfo()
User2.DisplayAccountInfo()
User1.Deposit(500)
User2.Deposit(1200)
print("Amount of {} after deposit is {}: ".format(User1.Name,User1.Amount))
print("Amount of {} after deposit is {}: ".format(User2.Name,User2.Amount))
User1.Withdraw(200)
User2.Withdraw(3000)
print("Amount of {} after withdraw is {}: ".format(User1.Name,User1.Amount))
print("Amount of {} after withdraw is {}: ".format(User2.Name,User2.Amount))
if __name__ == "__main__":
main()