Discover the answers you need at Westonci.ca, a dynamic Q&A platform where knowledge is shared freely by a community of experts. Discover precise answers to your questions from a wide range of experts on our user-friendly Q&A platform. Explore comprehensive solutions to your questions from knowledgeable professionals across various fields on our platform.

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 visit. Hopefully, the answers you found were beneficial. Don't hesitate to come back for more information. Your visit means a lot to us. Don't hesitate to return for more reliable answers to any questions you may have. Discover more at Westonci.ca. Return for the latest expert answers and updates on various topics.