Computer Science, asked by Angupta7, 10 months ago

write a python program to Create a class to handle Bank transactions and display the transaction details.

Answers

Answered by winniewambugu9
2

Answer:

# BankAccount class  

class Bankaccount:  # Function to deposite amount  

def deposit(self):  

       amount = float(input("Enter amount to be deposited: "))  

       self.balance += amount  

       print("\n Amount Deposited:", amount)

   def __init__(self):

# Function to withdraw the 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  ")  

# Functin to display the amount  

def display(self):  

       print("\n Net Available Balance =", self.balance)

# Functin to display the amount  

def display(self):  

       print("\n Net Available Balance =", self.balance)

Explanation:

Answered by triptiverma888
0

Answer:

Hope it will help u....

Attachments:
Similar questions