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
Sliva [168]
3 years ago
5

Code Problem 2 in Python 2.

Computers and Technology
1 answer:
nlexa [21]3 years ago
3 0

I've included my code in a picture. I hope this helps!

You might be interested in
Define a function calc_pyramid_volume with parameters base_length, base_width, and pyramid_height, that returns the volume of a
Sever21 [200]

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

8 0
2 years ago
Choosing a per_formatted presentation that already has a design and the slots is called choosing What​
Aloiza [94]
A template is a predesigned presentation you can use to create a new slide show quickly. Templates often include custom formatting and designs, so they can save you a lot of time and effort when starting a new project.
8 0
2 years ago
What when can you expect technology to be effective?
loris [4]

Answer:

we dont have to expect , the technology are effective , as each day the technology are being advance and developed day by day. each day the technology are being more and more effective. they are effective now and they will be effective in future too

3 0
2 years ago
Can I have help on this
never [62]

the answer is the seconf one


6 0
3 years ago
Read 2 more answers
In a(n) __________ situation, a wireless device is configured to appear to be a legitimate access point, enabling the operator t
Basile [38]

Answer:

A) Malicious Association,

Hope this helps.

Explanation:

7 0
3 years ago
Other questions:
  • While Angela is making modifications to Katie’s Word document, she would like to inform Katie of the reasoning for the change. W
    10·1 answer
  • What is the oldest and most common technique to differentiate information systems?
    8·1 answer
  • What type of device does a computer turn to first when attempting to make contact with a host with a known IP address on another
    6·1 answer
  • )in the link based implementation of the ADT sorted list what is the worst case time efficiency of the remove method?
    7·1 answer
  • Located toward the right of the status bar and contains buttons for zooming the display in and out
    13·1 answer
  • 22. A<br> allows one computer to input data into another computer.
    6·1 answer
  • Suppose you are choosing between four different desktop computers: one is Apple MacIntosh and the other three are PC-compatible
    15·1 answer
  • Each sentence in the paragraph below has a number. Choose the number of two sentences that are in the wrong order in this story.
    14·1 answer
  • Write a Python program (rainfall.py) to collect data and calculate the average rainfall over a period of years. The program shou
    11·1 answer
  • Which of the following best explains how algorithms that run on a computer can be used to solve problems?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!