-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOops
More file actions
30 lines (18 loc) · 644 Bytes
/
Oops
File metadata and controls
30 lines (18 loc) · 644 Bytes
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
n=int(input("Enter Your Salary:"))
class Account:
def __init__(self, bal,acc):
self.balance = bal
self.account_number = acc
def debit(self,amount):
self.balance -= amount
print("Rs.",amount,"Was debited ")
print("Total Amount",self.get_balance())
def credit(self,amount):
self.balance += amount
print("Rs.",amount,"Was Credited ")
print("Total Amount",self.get_balance())
def get_balance(self):
return self.balance
acc1=Account(n,12345)
acc1.debit(1000)
acc1.credit(500)