Westonci.ca is the ultimate Q&A platform, offering detailed and reliable answers from a knowledgeable community. Experience the ease of finding accurate answers to your questions from a knowledgeable community of professionals. Experience the ease of finding precise answers to your questions from a knowledgeable community of experts.

Write a program that repeatedly shows the user a menu to select the shape form three main shapes or to print the shapes created so far. If the user selects to create a new shape, the program prompts the user to enter the values for the size of the selected shape (How many of the selected shape user wants to create). The shape is then stored in an array. If the user selects to print the current shapes, print the name and the total area of each shape to the console.

Sagot :

Answer:

Explanation:

The following code is written in Python. It creates a program that keeps printing out a menu allowing the user to create shapes. These shapes are saved in an array called shapes. Once the user decides to exit, it prints all of the shapes in the array along with their total area. The output can be seen in the attached picture below. Due to technical difficulties, I have added the code as a txt file below.

View image sandlee09
View image sandlee09
We appreciate your time on our site. Don't hesitate to return whenever you have more questions or need further clarification. We hope this was helpful. Please come back whenever you need more information or answers to your queries. Get the answers you need at Westonci.ca. Stay informed with our latest expert advice.