Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

> > > b = volume_of_cone () > > > What is the length of the radius of the cone?

ID: 2247318 • Letter: #

Question

> > > b = volume_of_cone () > > > What is the length of the radius of the cone? 10 > > > What is the height of the cone? 2 > > > print (b) 209.448 function name (3): calculate_velocity Parameters: initial position, final position, time Return value N/A Description: Write a function that finds the velocity using the initial position. final position, and time passed in the function. 1. Calculate the velocity using the following formula: velocity = final_position - initial_position/time Print the velocity in the following format: "With an final position of 100 meters, initial position of 0 meters, and a time of 80 seconds, the velocity is 12.5 m/s" Test Cases (not an exhaustive list): 1. > > > calculate_velocity (0, 100, 80) With a final position of 100 meters, initial position of 0 meters, and a time of 80 seconds, the velocity is 12.5 m/s. 2. > > > calculate_velocity(2, 10, 0, 5) With a final position of 10 meters, initial position of 2 meters, and a time of 0.5 seconds, the velocity is 16 n/s. Function name (4): liquid_converter Parameters: N/A Return values: N/A Description Write a user-interactive function to convert any number of gallons, quarts, prints, and gills, 1. Got the number of fluid ounces as an integer from the user. You can assume that the user input an int. 2. Calculate the total number of gallons. quarts, prints, and gills represented by the original number at fluid ounces, using the following information: a. There are 128 fluid ounces in a gallon. b There is 32 fluid ounces in a quart. c. There are 16 fluid ounces in a print. d There are 4 fluids ounces in a gill. 3. Print the calculated number of gallons, quarts, prints, and gills in the following format (assuming the user entered 6523): '6523 fluid ounces is 50 gallon (s). 3 quart (S). 1 print (s). and 2 gil (s)* Test Cases (not an exhaustive list): 1. > > > How many fluid ounces would you like to convert? 6521 6523 fluid ounces is 50 gallon (s), 3 quart (s), 1 pint (s), and 2 gill (s) 2. > > > How a any fluid ounces would you like to convert? 1250 1250 fluid ounces is 9 gallon (s), 2 quart (s), 2 print (s), and 0.5 gill (S) 3. > > > How many fluid ounces would you like to convert ? 180

Explanation / Answer

def calculate_velocity(initial_position, final_position, time):
vel = (final_position - initial_position) / time
print("With a final position of ", final_position, " meters, initial "
"position of ", initial_position, ", and a time of ", time,
" seconds, the velocity is ", vel, " m/s")

def liquid_converter():
oun = int(input("How many fluid ounces would you like to convert? "))
g = int(oun / 128)
oun -= g * 128
q = int(oun / 32)
oun -= q * 32
p = int(oun / 16)
oun -= p * 16
grill = int(oun / 4)
oun = 4 * grill
print (oun, " fluid ounces is ", g, " gallon(s), ", q, " quart(s), ", p, " pint(s), and ", grill, " grill(s)")
  
calculate_velocity(2, 10, 0.5)
liquid_converter()

The output for above program is:

With a final position of 10 meters, initial position of 2 , and a time of 0.5 seconds, the velocity is 16.0 m/s
How many fluid ounces would you like to convert?
6523
8 fluid ounces is 50 gallon(s), 3 quart(s), 1 pint(s), and 2 grill(s)

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote