-
Notifications
You must be signed in to change notification settings - Fork 0
/
Banking1.py
46 lines (34 loc) · 1.2 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
# Instance variable : Name, Amount, Address, AccountNo
# Instance method : CreateAccount(), DisplayAccountInfo()
class Bank_Account:
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)
def main():
User1 = Bank_Account()
User2 = Bank_Account()
print("Createing the first account")
User1.CreateAccount()
print("Createing the second account")
User2.CreateAccount()
User1.DisplayAccountInfo()
User2.DisplayAccountInfo()
if __name__ == "__main__":
main()