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
____allow(s) visually impaired users to access magnified content on the screen in relation to other parts of the screen.
Ksenya-84 [330]
I think the answer is Screen Magnifiers
5 0
3 years ago
Write a program that performs a simulation to estimate the probability of rolling five of a kind in a single toss of five six-si
VikaD [51]

Answer:

import random

def probability_five_of_a_kind(num_trials):

   sums = 0

   for _ in range(num_trials):

       roll_1 = random.randrange(1,6, 1)

       roll_2 = random.randrange(1,6, 1)

       roll_3 = random.randrange(1,6, 1)

       roll_4 = random.randrange(1,6, 1)

       roll_5 = random.randrange(1,6, 1)

       collection = roll_1 + roll_2 + roll_3 + roll_4 + roll_5

       if collection == 5:

           sums += 1

   prob = round(sums/7776, 8)

   print(f"The probability_five_of_a_kind is {prob}")

   

probability_five_of_a_kind(100)

probability_five_of_a_kind(10000)

probability_five_of_a_kind(1000000)

Explanation:

The random package of the python language is used to select an integer value from the range of one to six representing the sides of a die. All six rolls are randomized and the sum. If the sum is equal to 5, the sums counter is incremented. At the end of the loop, the sum is divided by the five dices events (which is 6^5 = 7776).

8 0
2 years ago
Write a program that takes a string as input from the keyboard, representing a year.
Nady [450]
You forgot to mention the language.
7 0
3 years ago
What is a core in computer
Evgesh-ka [11]
<span>Hey there, this isn't really my part of town, I'm what you call a math freak, but here.

In relation to computer processors, a core is the processing kinda like a brain we ppl have, this is the unit that receives instructions and performs calculations, or actions, based on those instructions like when you click something. A set of instructions can allow a software program perform a specific function. Processors can have a single core or multiple cores that do many different things.
Hopefully i helped you, please mark brainly if possible.</span><span />
4 0
3 years ago
Read 2 more answers
What is the series of process in which light energy is converted into simple sugar called
tangare [24]

photosynthesis i think

7 0
3 years ago
Other questions:
  • How can i take out a random (double) number in between 5.0 to 15.0 in c++?
    7·1 answer
  • Which toolbar is located next to the office button and contain the commonly used commands​
    15·1 answer
  • Describe an application where a parallel circuit might work better than a series circuit.
    15·1 answer
  • A page with no meaningful content that is full of ads and the webmaster makes money from if someone clicks on them is called____
    7·1 answer
  • Write the definition of a function printDottedLine, which has no parameters and doesn't return anything. The function prints to
    10·1 answer
  • When did outdoor air pollution first become a significant problem?
    9·1 answer
  • When you open as many links as you want, and still stay in the same browser window instead of cluttering your screen with multip
    5·1 answer
  • Which PlayStation was the first to allow connection between it and computer network
    12·1 answer
  • 1)Create a conditional expression that evaluates to string "negative" if userVal is less than 0, and "positive" otherwise. Examp
    15·2 answers
  • computer have taken over a lot of boring, repetitive and time consuming as well as dangerous jobs.true or false
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!