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
Anestetic [448]
4 years ago
12

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

id 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.
Computers and Technology
1 answer:
olga_2 [115]4 years ago
4 0

Answer:

Following are the program in Python programming language

def pyramid_volume(base_length,base_width,pyramid_height):

base_area=base_length*base_width

volume=base_area*pyramid_height*(1/3)

return volume

print('volume for 4.5,2.1,3.0 is:',pyramid_volume(4.5,2.1,3.0))

Explanation:

Here, we define a function "pyramid_volume()" and pass an arguments "base_length,base_width,pyramid_height"

inside that program we have calculated the area of the pyramid and after that we have calculated the volume of that pyramid and return the volume.

Outside of the function we have called the function by passing the arguments.

You might be interested in
Six causes of data lost
Colt1911 [192]
What is the question here?
4 0
4 years ago
The set of three integer values for the lengths of the sides of a right triangle is called a Pythagorean triple. These three sid
Sloan [31]

Answer:

In Python:

def  Pythagorean_triple(hyp,side1,side2):

   if hyp**2 == side1**2 + side2*2:

       return True

   else:

       return False

               

print("Hypotenuse\tSide 1\t Side 2\t Return Value")

for i in range(1,501):

   for j in range(1,501):

       for k in range(1,501):

           print(str(i)+"\t"+str(j)+"\t"+str(k)+"\t"+str(Pythagorean_triple(i,j,k)))

Explanation:

This defines the function

def  Pythagorean_triple(hyp,side1,side2):

This checks for pythagorean triple

   if hyp**2 == side1**2 + side2*2:

Returns True, if true

       return True

   else:

Returns False, if otherwise

       return False

               

The main method begins

This prints the header

print("Hypotenuse\tSide 1\t Side 2\t Return Value")

The following is a triple-nested loop [Each of the loop is from 1 to 500]

for i in range(1,501): -->The hypotenuse

   for j in range(1,501): -->Side 1

       for k in range(1,501):-->Side 2

This calls the function and prints the required output i.e. the sides of the triangle and True or False

           print(str(i)+"\t"+str(j)+"\t"+str(k)+"\t"+str(Pythagorean_triple(i,j,k)))

8 0
3 years ago
In a style sheet, what must you use to separate multiple declarations for one selector within a rule?
ExtremeBDS [4]
You must use a semicolon (;)
4 0
3 years ago
PLEASE HELP THIS IS URGENT
Kamila [148]

Answer:

Sales of movie tickets has been dropping! In an effort to attract more viewers, the theater has started a new policy charging $4.00 for all tickets sold after 2200 (10PM). However, no children may purchase tickets after that time. Add logic to the program of exercise 8 to implement the new policy.

7 0
3 years ago
Giving brainlist to whoever answer this!! what is a typographic style?
zaharov [31]

The Elements of Typographic Style is the authoritative book on typography and style by Canadian typographer, poet and translator Robert Bringhurst. Originally published in 1992 by Hartley & Marks Publishers, it was revised in 1996, 2001 (v2. 4), 2002 (v2. 5), 2004 (v3).

5 0
3 years ago
Read 2 more answers
Other questions:
  • Ben chang noticed that his store was lagging in sales . He realized that his staff was not experienced enough . As the store man
    13·2 answers
  • Write a program that reads a file containing text. Read each line and send it to the output file, preceded by line numbers. If t
    8·1 answer
  • Technician A says that wheel speed sensors are a highly probable cause of illuminated EBC warning lamps. Technician B says that
    10·1 answer
  • Which type of malware self-replicates between computers (from one computer to another)?
    13·1 answer
  • As a rising photographer who has recently been recognized for several impactful images, why might you explore copyright protecti
    13·1 answer
  • Who else doin online school
    12·2 answers
  • How do I delete my brainly account?<br> I don't need anymore.
    13·2 answers
  • The section of the Telecommunications Act that attracted the most attention was the one calling for the creation of ______, whic
    5·1 answer
  • Select the correct answer
    15·1 answer
  • What can you achieve if you divide your search engine marketing account into relevant campaigns and ad groups?.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!