1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
yarga [219]
2 years ago
12

Define a function calc_pyramid_volume with parameters base_length, base_width, and pyramid_height, that returns the volume of a

pyramid with a rectangular base.
Sample output with inputs: 4.5 2.1 3.0
Volume for 4.5, 2.1, 3.0 is: 9.45
Relevant geometry equations:
Volume = base area x height x 1/3
Base area = base length x base width.

given to me
''' Your solution goes here '''
length = float(input())
width = float(input())
height = float(input())
print('Volume for', length, width, height, "is:", calc_pyramid_volume(length, width, height))
Computers and Technology
1 answer:
Sever21 [200]2 years ago
8 0

The missing segment of the code illustrates the use of functions.

Functions are also referred to as <em>procedures or methods</em>; they are set of instructions that act as one.

The code segment that complete the code in the question is as follows:

<em>def calc_pyramid_volume(length, width, height): </em>

<em>    baseArea = length * width </em>

<em>    Volume = baseArea * height * 1/3 </em>

<em>    return Volume</em>

<em />

<em />

The first line of the code segment declares the function itself

<em>def calc_pyramid_volume(length, width, height):</em>

Then, the base area of the pyramid is calculated

<em>    baseArea = length * width</em>

Then, the volume of the pyramid is calculated

<em>    Volume = baseArea * height * 1/3</em>

Lastly, the volume is returned to the main method

<em>    return Volume</em>

So, the complete code (without comments) is:

<em>def calc_pyramid_volume(length, width, height): </em>

<em>    baseArea = length * width </em>

<em>    Volume = baseArea * height * 1/3 </em>

<em>    return Volume </em>

<em>     </em>

<em>length = float(input()) </em>

<em>width = float(input()) </em>

<em>height = float(input()) </em>

<em>print('Volume for', length, width, height, "is:", calc_pyramid_volume(length, width, height))</em>

<em />

See attachment for the sample run

Read more about functions at:

brainly.com/question/17225124

You might be interested in
True or False: Wire service provide tabloid news reports to media outlets.
Setler79 [48]

Answer:

True

Explanation:

this is true and here is an explanation on how they operate.

New is readily available through various sources, newspapers, magazine, radio, tv,and the internet. Each of these sources in competition.

A given story most times had same content often times due to much dependence on wired services.

wire services would collect stories from reporters, edit them to standard format and then distribute to broadcast stations and print media.

3 0
3 years ago
Software and technology that allow people to work together on a task are known as
exis [7]

Collaborative software or groupware.

5 0
3 years ago
Read 2 more answers
2. A well designed high-volume system will minimize _________ inventory and reduce _____________for the product or service. a) w
valina [46]

Answer:

A.

Explanation:

A well designed high-volume system will minimize work-in-process (WIP) inventory and reduce lead time for the product.

Work in process (WIP) are partially finished products. WIP inventory could be minimized by designing a suitable high-volume system.

Lead time or throughput time is the time taken for a product to be manufactured or processed. A well designed high-volume system would reduce throughput time.

7 0
3 years ago
Describe personal computer skills using three adjectives?
Volgvan

Answer:

proficient with Microsoft word Excel and PowerPoint

Explanation:

compost and send over 150 images microsoftop creating and the formatting simple office budget speed sheets on Microsoft Excel Bros and its documents Microsoft word

5 0
2 years ago
Read 2 more answers
Home
Papessa [141]

Answer:

Enables online download of music

Enables reading while exercising

Reduces the need for printing

Enables sending documents to multiple recipients

Provides savings on travel expenses by supporting virtual meetings

Provides flexible work schedules and environments

Explanation:

7 0
4 years ago
Other questions:
  • Where can you access email accounts on your windows 7 computer in order to modify current accounts or create new ones?
    5·1 answer
  • What is statement used to communicate ones feelings in a nonconfrontational manner
    9·1 answer
  • Write a Python function called validateCreditCard that takes 8-digit credit card number as the input parameter (string value) an
    8·1 answer
  • ____ port is a connection in which eight data lines transmit an entire byte of data at one moment in time.
    12·1 answer
  • Consider a computer with two processes, H, with high priority, and L, with low priority. The scheduling rules are such that H is
    15·1 answer
  • Ella has finished drafting her presentation. What should she do next?
    6·2 answers
  • A restaurant has a case type that allows customer to book the dining room for events. Customers provide basic information includ
    7·1 answer
  • Memory management is concerned with __________.
    14·1 answer
  • Please help me with these questions.
    10·1 answer
  • A jeweler designing a pin has decided to use five stones chosen from diamonds, rubies, and emeralds. In how many ways can the st
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!