#2. Write a program which contains one class named as BankAccount.
#BankAccount class contains two instance variables as Name & Amount.
#That class contains one class variable as ROI which is initialise to 10.5.
#Inside init method initialise all name and amount variables by accepting the values from user.
#There are Four instance methods inside class as Display(), Deposit(), Withdraw(),
#CalculateIntrest().
#Deposit() method will accept the amount from user and add that value in class instance variable
#Amount.
#Withdraw() method will accept amount to be withdrawn from user and subtract that amount
#from class instance variable Amount.
#CalculateIntrest() method calculate the interest based on Amount by considering rate of interest
#which is Class variable as ROI.
#And Display() method will display value of all the instance variables as Name and Amount.
#After designing the above class call all instance methods by creating multiple objects.


class BankAccount:
	ROI = 10.5;

	def __init__(self,Name,Amount):
		self.Name = Name;
		self.Amount = float(Amount);

	def Deposit(self):
		self.Amount += float(input("Enter the amount :"));

	def Withdraw(self):
		amt_withdraw = float(input("Enter the amount :"));
		if(self.Amount > amt_withdraw):
			self.Amount -= amt_withdraw;

	def CalculateInterest(self):
		return (BankAccount.ROI * self.Amount)/100;

	def Display(self):
		print("Name :" ,self.Name);
		print("Amount :" ,self.Amount);
		print("Interest :" ,self.CalculateInterest());


obj = BankAccount("harshal",1000);
obj.Deposit();
obj.Withdraw();
obj.Display();





