-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcode_second_opps.py
More file actions
40 lines (31 loc) · 934 Bytes
/
Copy pathcode_second_opps.py
File metadata and controls
40 lines (31 loc) · 934 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
31
32
33
34
35
36
37
38
39
40
#-------------------------------------------------------------------------------
# Name: module1
# Purpose:
#
# Author: Yash Amte
#
# Created: 19-02-2025
# Copyright: (c) Yash Amte 2025
# Licence: <your licence>
#-------------------------------------------------------------------------------
class Account:
banK_name = "jio bank"
def __init__(self, balance, account):
self.bal = balance
self.acc = account
print("account detail fetch")
def debit(self, amount):
self.bal-=amount
print("Rs :", amount,"was debited")
print("total balance ", self.get_bal())
def credit(self, amount):
self.bal+= amount
print("Rs :", amount, "was credited" )
print("total balance ", self.get_bal())
def get_bal(self):
return self.bal
A1=Account(1000,"A1010101")
A1.debit(1000)
A1.credit(50000)
A1.debit(30000)
A1.debit(4000)