Lab Topic 6 team F23

docx

School

Texas A&M University *

*We aren’t endorsed by this school

Course

102

Subject

Computer Science

Date

Jan 9, 2024

Type

docx

Pages

2

Uploaded by ProfLightning103643

Report
Lab: Topic 6 (team) ENGR 102 Lab: Topic 6 Deliverables: There is one deliverable for this team assignment. Please submit the following file to zyBooks: pyramid_area1.py Remember to include the team header at the top of your files. Activity #1 : Pyramid area – team In engineering and science, we often want to calculate the effect of some complex behavior. To make this possible, we create a model of the behavior. A model attempts to describe the behavior in a way that is understandable and computable. Some models are based on physical laws and principles, some are based on replicating observations, and many are a combination of these. Once you have a model, you can use it to analyze and predict the performance or behavior of some system or phenomenon. In this activity, your team will need to develop a model to calculate a requested quantity of interest. An ancient ruler has decided to build a Geometry Temple in the form of a triangle-base pyramid made up of triangular prisms with a given side (as illustrated below). The top and bottom of each prism is an equilateral triangle with the height of the prism equal to one side of the triangle. The Temple has n layers, where the bottom layer forms an equilateral triangle with a side length of n prisms, and the top layer is a single triangular prism. The ancient ruler wants the surface of the Temple to be covered with gold. What is the total area of gold foil that is needed in order to accomplish this? Your team has decided to help the ancient ruler. Your team needs to develop a model to calculate the total area of gold foil that will cover the Temple (that is, to cover the visible side and top surface areas, not the bottom and hidden areas). Based upon Dr. Keyser’s Original 1 Revised Fall 2023 SNR
Lab: Topic 6 (team) Write a program named pyramid_area1.py that will ask the user to input the length of one side of the prism (in meters) and the number of layers of the pyramid. Your program must use a loop. Remember to test your code. The ancient ruler would not be happy if the ancient builders ran out of gold foil before the Temple was covered completely. The ruler would get even more upset if the ancient builders asked for more gold than was needed. Have your program format the output as shown below. The area should be displayed using two (2) decimal places. Example output (using inputs 1 , 5 ): Enter the side length in meters: 1 Enter the number of layers: 5 You need 55.83 m^2 of gold foil to cover the pyramid Based upon Dr. Keyser’s Original 2 Revised Fall 2023 SNR
Your preview ends here
Eager to read complete document? Join bartleby learn and gain access to the full version
  • Access to all documents
  • Unlimited textbook solutions
  • 24/7 expert homework help