PROGRAM#1
Objective: To calculate area of a triangle
PROGRAM
b=float(input(“ Enter the base of a triangle: ”))
h=float(input(“ Enter the height of a triangle: ”))
area=0.5*b*h
print(“The area of a triangle is: ”, area)
OUTPUT
PROGRAM#2
Objective: To calculate simple interest
PROGRAM
p=float(input(“Enter the Principal amount: ”))
r=float(input(“Enter the rate of interest: ”))
t=float(input(“Enter the time period: ”))
si=p*r*t
print(“The simple interest is: ”,si)
OUTPUT
PROGRAM#3
Objective: To calculate compound interest
p=float(input("Enter the principal amount: "))
r=float(input("Enter the rate of interest: "))
t=float(input("Enter the Time period: "))
n=float(input("Enter the times interest is compounded: "))
I=p*(1+r/n)**(n*t)
print("The compound Interest is: ",I)