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
denis23 [38]
3 years ago
6

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.
Computers and Technology
2 answers:
Brut [27]3 years ago
3 0

Answer:

Define a function pyramid_volume with parameters base_length, base_width, and pyramid_height, that returns the volume of a pyramid with a rectangular base.

Explanation:

thats all you said

lesya692 [45]3 years ago
3 0

In python 3.8:

def pyramid_volume(base_length, base_width, pyramid_height):

   return round((base_length*base_width*pyramid_height)/3,2)

print(pyramid_volume(1,1,2))

I used the round function to round the volume to 2 decimal places. You can change this if you need more or less precision. I hope this helps!

You might be interested in
Write a zip code class that encodes and decodes 5-digit bar codes used by the U.S. Postal Service on envelopes. The class should
8_murik_8 [283]

Answer:

#include<iostream>

#include<string>

using namespace std;

class zip_code

{

private:

int zipcode;

string get_string(int num)

{

string str="";

if(num == 0) return "11000";

if(num>7)

{

str.append("1");

num = num-7;

}

else

str.append("0");

if(num>4)

{

str.append("1");

num = num-4;

}

else

str.append("0");

if(num>2)

{

str.append("1");

num = num-2;

}

else

str.append("0");

if(num>1)

{

str.append("1");

num = num-1;

}

else

str.append("0");

str.append("0");

return str;

}

public:

zip_code(int barcode)

{

if(barcode<10000 || barcode>99999)

cout <<"Invalid Bar code passed to constructor." << endl;

else

zipcode = barcode;

}

zip_code(string barcode)

{

if(barcode.length()>27)

cout <<"Invalid Bar code passed to constructor." << endl;

else

{

int zipper = 0;

string str_local = barcode.substr(1,barcode.length()-2);

for(int i=0; i<str_local.length()-5; i+=5)

{

int local = 0;

local = 7*(str_local[i]-'0') +

       4*(str_local[i+1]-'0') +

       2*(str_local[i+2]-'0') +

       1*(str_local[i+3]-'0');

if(local == 11) local = 0;

       zipper = zipper*10 + local;

}

zipcode = zipper;

}

}

string getZipcode()

{

string str = "1";

int first = zipcode/10000;

int second = (zipcode - first*10000)/1000;

int third = (zipcode - first*10000-second*1000)/100;

int fourth = (zipcode - first*10000-second*1000-third*100)/10;

int fifith = (zipcode - first*10000-second*1000-third*100-fourth*10);

str.append(get_string(first));

str.append(get_string(second));

str.append(get_string(third));

str.append(get_string(fourth));

str.append(get_string(fifith));

str.append("1");

return str;

}

int get_zipCode()

{

return zipcode;

}

};

int main()

{

zip_code z1(123456);

zip_code z2(99504);

cout << z2.getZipcode() << endl;

system("pause");

return 0;

}

4 0
4 years ago
If you suspect corrupted system files are causing issues, what command can be run to search for and replace the corrupted files?
ki77a [65]
When suspecting corrupted system files that are causing issues, the sfc (scNNnow) command can be used to search for and replace those files.
4 0
3 years ago
The Fed: decreases the money supply when the economy contracts. performs banking services for commercial banks in districts wher
Slav-nsk [51]

Answer:

performs banking services for commercial banks in districts where it operates.

Explanation:

The Federal Reserve System ( popularly referred to as the 'Fed') was created by the Federal Reserve Act, passed by the U.S Congress on the 23rd of December, 1913. The Fed began operations in 1914 and just like all central banks, the Federal Reserve is a United States government agency.

Generally, it comprises of twelve (12) Federal Reserve Bank regionally across the United States of America.

Hence, the Fed performs banking services for commercial banks in districts where it operates, as well as providing services to the general public.

4 0
3 years ago
"When using BitLocker on a laptop, the laptop should not use standby mode, rather it should use hibernate mode. This is because
Harman [31]

Answer:

This statement is false.

Explanation:

The correct statement should read:

"When using BitLocker on a laptop, the laptop should not use standby mode, rather it should use hibernate mode. This is because Hibernate writes memory to the computer’s disk drive, ****which means the contents of the computer's memory are protected by Bitlocker.****

Standby mode (which is basically putting the computer to sleep) keeps the computer in a very low power state, and memory is maintained and not protected by BitLocker."

Hope this Helps.

6 0
4 years ago
A ____ software helps you create and display worksheets containing data
kondor19780726 [428]

the answer would be spreadsheet

8 0
3 years ago
Other questions:
  • 14. The data selected to create a table must include
    12·2 answers
  • Simpson is trying to solve an equation related to converting a decimal number to its hexadecimal form. He decides to utilize the
    6·1 answer
  • What is the program filename and extension of file explorer?
    9·1 answer
  • A project team was researching the risks involved in setting up a computer system. They decide to go ahead with their plan, rega
    7·1 answer
  • Which category of system software provides a platform for application software to run on?
    12·2 answers
  • Text can be inserted into a presentation by
    7·1 answer
  • Which flowchart symbol indicates the start or the end of a process?
    8·1 answer
  • A reflective cross-site scripting attack (like the one in this lab) is a __________ attack in which all input shows output on th
    14·1 answer
  • How do I get the bot token for discord? (scripting etc)
    5·1 answer
  • What's the best thing that's happened to you during quarantine?
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!