answer it only if you know the answer and I want python program codes and wap means write a program
Attachments:
Answers
Answered by
0
Answer:
# program to find the perimeter of the rectangle,square and circle using the same function
def perimeter(figure):
if figure=="circle":
r=int(input("enter the radius"))
c=2*3.14*r
print(c)
elif figure=="rectangle":
l=int(input("enter the length"))
b=int(input("enter the breadth"))
p=l*b
print(p)
elif figure=="square":
a=int(input("enter the side"))
p=4*a
print(p)
else:
print("sorry")
#main
f=str(input("enter the figure"))
perimeter(f)
Similar questions