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
andreyandreev [35.5K]
3 years ago
7

Now create a separate function called sphereVolume that determines the volume of a sphere with a given radius and prints the res

ult to the screen. Specifications:
a. Your function MUST be named sphereVolume
b. Your function should have one input argument: a floating point parameter representing the radius - as a double
c. Your function should not return anything.
d. Your function should print the calculated volume.
e. The output format should resemble that of the previous problem. For a radius of 5, the function should print:
Engineering
2 answers:
Stella [2.4K]3 years ago
6 0

Answer:

The question is not complete. the complete question is shown below.

Now create a separate function called sphereVolume that determines the volume of a sphere with a given radius and prints the result to the screen. Specifications:

a. Your function MUST be named sphereVolume

b. Your function should have one input argument: a floating point parameter representing the radius - as a double

c. Your function should not return anything.

d. Your function should print the calculated volume.

e. The output format should resemble that of the previous problem. For a radius of 5, the function should print:

Volume: 523.99

Explanation:

professor190 [17]3 years ago
6 0

complete question:

Now create a separate function called sphereVolume that determines the volume of a sphere with a given radius and prints the result to the screen. Specifications:

a. Your function MUST be named sphereVolume

b. Your function should have one input argument: a floating point parameter representing the radius - as a double

c. Your function should not return anything.

d. Your function should print the calculated volume.

e. The output format should resemble that of the previous problem. For a radius of 5, For example: Test Result sphereVolume(5); volume: 523.599

Answer:

import math

def sphereVolume(r):

          # where r = radius of the sphere

             volume = 4/3 * math.pi * r**3

             print(round(volume, 3))

sphereVolume(5)

Explanation:

The code is written in python .

def sphereVolume(r):

This line of code defines the function as instructed as sphereVolume.

# where r = radius of the sphere

This is just a line of comment to explain that the argument r is the radius

volume = 4/3 * math.pi * r**3

The volume of a sphere is 4\pir³. so the code define the formula of a volume of a sphere and stored it in a variable called volume.

print(round(volume, 3))

The code displays the answer of a volume of a sphere when passing  the radius  of a sphere as the argument . The volume of the sphere is rounded to 3 decimal place using the function round.

sphereVolume(5)

This code calls the function with the argument which is the radius.

You might be interested in
Set oWMP = CreateObject("WMPlayer.OCX.7?) Set colCDROMs = oWMP.CdromCollection do if colCDROMs.Count >= 1 then For i = 0 to c
vladimir2022 [97]

Answer:

gg

Explanation:

gg

7 0
3 years ago
What is the mass of a brass axle that has a volume of 0.318 cm? ​
NeX [460]

Answer:

2.7g

Explanation:

the mass of a brass axle that has a volume of 0.318 cm is 2.7g.

8 0
3 years ago
Design for human-fit strategies include:
andreev551 [17]

Answer:

B- extreme fit, close fit, adjustable fit

Explanation:

A human-fit design typically involves the process of manufacturing or producing products (tools) that are easy to use by the end users. Therefore, human-fit designs mainly deals with creating ideas that makes the use of a particular product comfortable and convenient for the end users.

The design for human-fit strategies include; extreme fit, close fit and adjustable fit.

Hence, when the aforementioned strategies are properly integrated into a design process, it helps to ensure the ease of use of products and guarantees comfort for the end users.

5 0
3 years ago
What are the dimensions of the base of the pyramid?
Cloud [144]

Answer:

b

Explanation:

bcus it is

7 0
3 years ago
In this exercise, you will write a Point structure that represents a space in two-dimensional space. This Point should have both
Afina-wow [57]

Answer:

Check the explanation

Explanation:

Points to consider:

We need to take the input from the user

We need to find the manhatan distance and euclidian using the formula

(x1, y1) and (x2, y2) are the two points

Manhattan:

|x_1 - x_2| + |y_1 - y_2|

Euclidian Distance:

\sqrt{(x1 - yl)^2 + (x2 - y2)^2)}

Code

#include<stdio.h>

#include<math.h>

struct Point{

  int x, y;

};

int manhattan(Point A, Point B){

  return abs(A.x - B.x) + abs(A.y- B.y);

}

float euclidean(Point A, Point B){

  return sqrt(pow(A.x - B.x, 2) + pow(A.y - B.y, 2));

}

int main(){

  struct Point A, B;

  printf("Enter x and Y for first point: ");

  int x, y;

  scanf("%d%d", &x, &y);

  A.x = x;

  A.y = y;

  printf("Enter x and Y for second point: ");

  scanf("%d%d", &x, &y);

  B.x = x;

  B.y = y;

  printf("Manhattan Distance: %d\n", manhattan(A, B));

  printf("Euclidian Distance: %f\n", euclidean(A, B));

 

}

Sample output

8 0
4 years ago
Other questions:
  • More discussion about seriesConnect(Ohm) function In your main(), first, construct the first circuit object, called ckt1, using
    10·1 answer
  • A 356 cast aluminum test bar is tested in tension. The initial gage length as marked on the sample is 50mm and the initial diame
    9·1 answer
  • The screw of shaft straightener exerts a load of 30 as shown in Figure . The screw is square threaded of outside diameter 75 mm
    5·1 answer
  • A turboprop engine consists of a diffuser, compressor, combustor, turbine, and nozzle. The turbine drives a propeller as well as
    12·1 answer
  • Fuel Combustion and CO2 Sequestration [2016 Midterm Problem] Long-term storage of carbon dioxide in underground aquifers or old
    5·1 answer
  • Which of the following statements is not true about underage drinking?
    10·1 answer
  • Give three examples of how engineering has made human life better in your opinion.
    13·1 answer
  • Thermodynamics fill in the blanks The swimming pool at the local YMCA holds roughly 749511.5 L (749511.5 kg) of water and is kep
    6·1 answer
  • ⊂who else is obsessed with the ornail
    9·1 answer
  • Which type of Artificial Intelligence (AI) can repeatedly perform tasks of limited scope?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!