Answer:
import math
def AreaOfCircle(r):
return round(math.pi*r**2,2)
def AreaOfTriangle(l,b):
return (l*b)/2
r=int(input("Enter the radius of a circle: "))
print("Area of the circle is: "+str(AreaOfCircle(r)))
l=int(input("Enter the length of a triangle: "))
b=int(input("Enter the breadth of a triangle: "))
print("Area of the triangle is: "+str(AreaOfTriangle(l,b)))
Explanation:
Copyright © 2024 EHUB.TIPS team's - All rights reserved.
Answers & Comments
Answer:
import math
def AreaOfCircle(r):
return round(math.pi*r**2,2)
def AreaOfTriangle(l,b):
return (l*b)/2
r=int(input("Enter the radius of a circle: "))
print("Area of the circle is: "+str(AreaOfCircle(r)))
l=int(input("Enter the length of a triangle: "))
b=int(input("Enter the breadth of a triangle: "))
print("Area of the triangle is: "+str(AreaOfTriangle(l,b)))
Explanation: