Question: Help me with this code! 1 . Given the diameter and the height, write a Python function named calculate _ cylinder _ volume to return
Help me with this code!
Given the diameter and the height, write a Python function named calculatecylindervolume to return we solved very similar one in our last assignment but that time we didn't return a value. We printed it the volume of the cylinder. The volume, v of a cylinder with diameter, d and height h is given by vpidh
Assume a soda can is a perfect cylinder. Write a Python function named countsodacans to return the number of soda cans of a given diameter and a given height that is required to be fully filled out of the given bulk volume amount of soda. Here you must use the function calculatecylindervolume you wrote above to calculate the volume of the soda can. Here is an example: assume the volume of a soda can calculated is fluid ounce, and bulk soda volume is ounce, you require soda cans to fully fill them with soda. The left over amount is soda ounce. Mathematically Call calculatecylindervolume in your function.
Write a Python function named calculaterevenue to calculate total sale price of a given amount of product of a given unit price. There is discount per item sold. The default discount amount is $ per item sold. In your main program, calculate the revenues of selling soda cans worth $ each with no discount. Convert your value to an integer and print it In your main program, calculate the revenues of selling soda cans worth $
The expected output of the full code is
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
