# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# +
### Assignment 1


class bankAccount():
    def __init__(self,ownerName,balance):
        self.ownerName = ownerName
        self.balance = balance
        
    def deposit(self):
        amount = float(input("Enter amount to be deposited -"))
        self.balance= self.balance + amount
        print("Owner Name-",self.ownerName)
        print("balance-",self.balance)
        
    def withdraw(self):
        amount = float(input("Enter amount to be withrawn -"))
        if self.balance >= amount:
            self.balance= self.balance - amount
            print("You withdrew-", amount)
        else:
            print("Insufficient balance")
        print("Owner Name-",self.ownerName)
        print("balance-",self.balance)
        


# -

BOB = bankAccount("<NAME>", 1000)

BOB.deposit()

BOB.withdraw()

BOB.withdraw()

BOB.deposit()

BOB.withdraw()


# +
##

# +
## Assignment 2

# +
class cone():
    pi = 3.14
    
    def __init__(self, Radius, Height):
        self.Radius = Radius
        self.Height = Height
        
    def Volume(self):
        Radius = float(input("Radius -"))
        Height = float(input("Height -"))
        print("The volume of the Cone is -",cone.pi* Radius**2 * Height/3)
        
    def SufaceArea(self):
        Radius = float(input("Radius -"))
        Height = float(input("Height -"))
        print("The Curved Surface Area of the Cone is -", cone.pi * Radius * (Radius**2 + Height**2)**0.5)
        print("The Base Surface Area of the Cone is -", cone.pi * Radius**2 )
        print("The Total Surface Area of the Cone is -",  cone.pi * Radius * (Radius**2 + Height**2)**0.5 + cone.pi * Radius**2)
        
    
        
       
# -

Cone = cone("Radius","Height")

Cone.Volume()

Cone.SufaceArea()



StarcoderdataJupyterScriptsDedupFiltered