-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBanking1.py
47 lines (35 loc) · 1.31 KB
/
Banking1.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
# Instance variable = name, account, address ,accountNo
# instance method : CreateAccount( ) DisplayAccount()
class BankAccount:
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():
Customer1 = BankAccount()
Customer2 = BankAccount()
print("Account no 1 ")
Customer1.CreateAccount()
print("Account no 2")
Customer2.CreateAccount()
Customer1.DisplayAccountInfo()
Customer2.DisplayAccountInfo()
if __name__ == "__main__":
main()