The python program that creates a Bankaccount class for a Bank ATM that is made up of the customers and has a deposit and withdrawal function is given below:
# Python program to create Bankaccount class
# with both a deposit() and a withdraw() function
class Bank_Account:
def __init__(self):
Ā self.balance=0
Ā print("Hello!!! Welcome to the Deposit & Withdrawal Machine")
def deposit(self):
Ā amount=float(input("Enter amount to be Deposited: "))
Ā self.balance += amount
Ā print("\n Amount Deposited:",amount)
def withdraw(self):
Ā amount = float(input("Enter amount to be Withdrawn: "))
Ā if self.balance>=amount:
Ā self.balance-=amount
Ā print("\n You Withdrew:", amount)
Ā else:
Ā print("\n Insufficient balance ")
def display(self):
Ā print("\n Net Available Balance=",self.balance)
# Driver code
# creating an object of class
s = Bank_Account()
# Calling functions with that class object
deposit()
s.withdraw()
s.display()
Read more about python programming here:
https://brainly.com/question/26497128
#SPJ1