Computer Science, asked by shruti13845, 1 month ago

write a menu driven program to find the perimeter of square ,rectangle, or circumference of a circle

# best ans will marked brainlist ​

Attachments:

Answers

Answered by SidharthSK1122
3

Answer:

PYTHON ANS

Explanation:

print("Choice 1: Area of Circle")

print("Choice 2: Perimeter of Square")

print("Choice 3: Perimeter of Rectangle")  

print("Choice 4: Exit")

print("\n")

#Defining variables

choice = int(input("Enter your choice: "))

cm = "Circumference/Perimeter is: "  

areaunit = "Area in square meters: "

#Creating choices

while True:

   if choice==4:

       break

       print("Thank you for your valuable time. Please do give a feedback.")

   

   elif choice==1:

           import math

           r = float(input("Enter radius of circle: "))

           area = (math.pi)*(r)*(2)

           print(cm)

           print(area)

           print("\n")

   elif choice==2:

           import math

           print("\n")

           side = int(input("Enter the side of the square: "))

           vol = (side*4)

           print("\n")

           print(cm)

           print(vol)

           print("\n")

   elif choice==3:

           import math

           print("\n")

           l = int(input("enter length of the rectangle: "))

           b = int(input("Enter breadth of the rectangle: "))

           print("\n")

           volcy =2*(l+b)  

           print(volunit)

           print(volcy)

           print("\n")

 

   #If incorrect/invalid choice is chosen

   else:

       print("Invalid choice. Please enter a valid chioce between 1 to 4.")

       print("\n")

       break

print("Thank you for your valuable time. Please do give a feedback.")

Answered by raviias9000
1

aaj bht dino baad baat hui..

sach batau mai bht miss krta hu tumko...

rum bhul gyi kya

Similar questions