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
Ne4ueva [31]
3 years ago
9

The volume of a sphere is 4/3πr3, where π has the value of "pi". Write a function called print_volume (r) that takes an argument

for the radius of the sphere, and prints the volume of the sphere.
Call your print_volume function three times with different values for radius.
Computers and Technology
1 answer:
Marizza181 [45]3 years ago
6 0

Answer:

In Python:

def print_volume (r):

   volume = 4/3 * 3.142*r**3

   print(volume)

print_volume(7)

print_volume(14)

print_volume(22)

Explanation:

This defines the function and takes radius r as the parameter

def print_volume (r):

This calculates the volume

   volume = 4/3 * 3.142*r**3

This prints the volume

   print(volume)

The next three lines call the function with different values

<em>print_volume(7)</em>

<em>print_volume(14)</em>

<em>print_volume(22)</em>

You might be interested in
Certain country in the Caribbean Sea recently held an election to choose its president. Every vote cast was electronic, but unfo
lesya [120]

Answer:

Certain country in the Caribbean Sea recently held an election to choose its president. Every vote cast was electronic, but unfortunately, a recent power surge caused a malfunction in the system just before votes were counted. The only information saved consists of the following facts:

Explanation:

• All the N citizens casted their vote.

• Exactly one candidate received more than N/2 votes.

• We don’t know how many candidates there were.

You are hired to help using your expertise in algorithms.

5 0
2 years ago
A throw(...) statement is an alternative way to return from a function or method that indicates some kind of failure occurred.
WITCHER [35]

Answer:

a.True.

Explanation:

A throw statement is used to throw an exception from inside the method.Whenever the throw statement is encountered by the compiler and after that when it is executed the execution of the currently executing method is stopped and it returns back to caller.

There is also a keyword Throws which is used to tell the compiler that the method may throw one or more exceptions.

Hence we conclude that the answer is True.

6 0
4 years ago
Which item converts a high level language program to low level machine instruction?
vodomira [7]
The compiler translates each source code instruction into the appropriate machine language instruction, an
8 0
3 years ago
What is self management.​
OLEGan [10]

Answer:

Self management is being able to control your emotion & behavior. This is a very important life skill

Explanation:

8 0
3 years ago
Read 2 more answers
True or False: A combination of a solid yellow and a broken yellow line means that you can pass only on the side that has the br
amid [387]
True, because the broken line gives you the ability to cross and pass, with the solid line you are not allowed to pass.
3 0
3 years ago
Read 2 more answers
Other questions:
  • 14. Which commercial RDBMS product was the first to hit the market and is the biggest?
    15·1 answer
  • In traditional programming, probably the most often used error-handling outcome was to ____.
    15·1 answer
  • What are chemical manufacturers required to provide to anyone who purchases or uses their chemicals for a work purpose? Select a
    8·2 answers
  • Which programming language looks similar to human languages?
    12·1 answer
  • When you see a yield sign what do you do?
    8·1 answer
  • An administrator needs to make sure that video conferencing is allocated a high portion of bandwidth within a company network. W
    11·1 answer
  • is the process of creating a message to be communicated. a. Encoding b. Decoding c. Receiving d. Sending
    10·2 answers
  • When activated, an Excel object has all the features of an Excel ______?
    9·2 answers
  • An entity can be said to have __ when it can be wronged or has feelings of some sort
    10·1 answer
  • Animation affects can be applied on both................ and................ on a slide​
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!