Ask questions, share knowledge, and connect with a vibrant community on IDNLearn.com. Our community is here to provide detailed and trustworthy answers to any questions you may have.

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 value your participation in this forum. Keep exploring, asking questions, and sharing your insights with the community. Together, we can find the best solutions. IDNLearn.com is committed to providing the best answers. Thank you for visiting, and see you next time for more solutions.