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]
2 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]2 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]2 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
In your own words, describe the structure and function of both the stack and queue data structure and discuss how they are diffe
Kobotan [32]

Answer:

Following are the answer to this question:

Explanation:

Stack:

The stack data structure is used to create method, parsing, analysis of expression, and tracking. This data type uses the LIFO system, which stands from the Last In First Out. This data structure operates on the top side. In this data structure, it performs two methods, that are "push() and pop()" method and the time complexity of the stack data structure O(1).

Example of Stack:

import java.util.*;//import package

 public class Main //defining class Main

{      

public static void main (String[] ag)//defining main method  

  {

     ArrayDeque<Character> stack = new ArrayDeque<Character>();//creating Character array ArrayDeque  

       stack.push('A'); //add value in stack  

      stack.push('B');//add value in stack  

      stack.push('B'); //add value in stack  

      System.out.println("First Insert:"+stack); //print value         stack.pop();//remove value from stack    

    System.out.println("After removing element: "+stack); //print value         stack.push('B'); //add value in stack    

    stack.pop();//remove value from stack      

 System.out.println("final value: "+stack); //print value    

}

}

Output:

First Insert:[B, B, A]

After removing element: [B, A]

final value: [B, A]

Queue:

The queue data structure is an abstract type, it is similar to the stacks data structure. It is open at both ends when opposed to lines. It follows the FIFO method, which stands for the First-In-First-Out method, At one end data is inserted and at the other end, it deletes the data and the time complexity of the queue data structure O(1).

Example of Queue:

import java.util.*;//import package  

public class Main//defining a class queue

{  

    public static void main(String[] ars)//defining main method

    {  

      LinkedList<Integer> que= new LinkedList<Integer>();//defining integer array LinkedList    

      for (int i = 0; i < 5; i++)//defining fo loop to add value in queue  

     {    

        que.add(i); //use add method to insert value        

}        

System.out.println("Queue value: "+ que); //print queue value      

  int remove= que.remove(); //remove value from the queue          System.out.println("after removing value from queue: "+ remove);//removing element from queue  

      System.out.println(que);  //after removing the element print value  

  }

}  

Output:

Queue value: [0, 1, 2, 3, 4]

after removing value from queue: 0

[1, 2, 3, 4]

6 0
3 years ago
2. An evil twin attack that broadcasts a legitimate SSID for an unauthorized network is an example of what category of threat? A
avanturin [10]

Answer:

A. Spoofing

Explanation:

Spoofing is the act of disguising a communication from an unknown source as being from a known, trusted source. Spoofing can apply to emails, phone calls, and websites, or can be more technical, such as a computer spoofing an IP address, Address Resolution Protocol (ARP), or Domain Name System (DNS) server.

IP spoofing involves an attacker trying to gain unauthorised access to a system by sending messages with a fake or "spoofed" IP address to make it look like the message came from a trusted source, such as one on the same internal computer network, for example.

Email spoofing often involves things like requests for personal data or financial transactions. The emails appear to be from trusted senders such as customers, coworkers, or managers but they are actually from cyber criminals who deliberately disguise themselves to gain your trust and your help with the action they want you to take

7 0
3 years ago
What did Adam and Eve look like?
Nata [24]
No one could possibly know, unfortunately.
6 0
3 years ago
Read 2 more answers
You are given a string of n characters s[1 : : : n], which you believe to be a corrupted text document in which all punctuation
alexdok [17]

Answer: provided in the explanation section

Explanation:

Given that:

Assume D(k) =║ true it is [1 : : : k] is valid sequence  words or false otherwise

  • To determine D(n)

now the sub problem s[1 : : : k] is a valid sequence of words IFF s[1 : : : 1] is a valid sequence of words and s[ 1 + 1 : : : k] is valid word.

So, from here we have that D(k) is given by the following recorance relation:

D(k) = ║ false maximum (d[l]∧DICT(s[1 + 1 : : : k]) otherwise

Algorithm:

Valid sentence (s,k)

D [1 : : : k]             ∦ array of boolean variable.

for a ← 1 to m

do ;

d(0) ← false

for b ← 0 to a - j

for b ← 0 to a - j

do;

if D[b] ∧ DICT s([b + 1 : : : a])

d (a) ← True

(b). Algorithm Output

      if D[k] = = True

stack = temp stack           ∦stack is used to print the strings in order

c = k

while C > 0

stack push (s [w(c)] : : : C] // w(p) is the position in s[1 : : : k] of the valid world at // position c

P = W (p) - 1

output stack

= 0 =

cheers i hope this helps !!!

8 0
3 years ago
Which Of the following components leads to slow computer performance when it becomes outdated
Scorpion4ik [409]

guess its d drivers , since u said wen it gets outdated


8 0
3 years ago
Read 2 more answers
Other questions:
  • Which statements describe the advantages of using XML?
    12·2 answers
  • You would like to set up an online meeting to communicate with colleagues on a group project. Which of these tools should you su
    9·1 answer
  • What is the different between image processing and machine vision? Please explain with an example.
    11·1 answer
  • Match each scenario to the absolute value expression that describes it. 1. the distance moved when going backwards five spaces i
    13·2 answers
  • Which is a false statement considering copyright law?
    13·2 answers
  • A _______________ is a security threat that may launch a worm through a Trojan horse or launch a denial-of-service attack at a t
    10·1 answer
  • A network administrator for a small company is contemplating how to scale the network over the next three years to accommodate p
    13·1 answer
  • write a program in C# that reads a set of integers and then finds and prints the sum of the even and odd integers?​
    12·1 answer
  • High level languages are closer to machine language than humans yes or no​
    12·2 answers
  • when working with smart which tab would provide the ability to change the shape or size of the smart art shapes
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!