Python Code Challenge ๐โ!!
This time, let's define a simple flow rate calculation and print the result.
What is the output of the following code?
--------------------------------------------------------
def calculate_flow_rate(volume, time):
# Flow Rate = Volume / Time
if time < 0:
raise ValueError("Time must be positive")
return volume / time
flow_rate = calculate_flow_rate(500, 0)
print(f"Flow Rate: {flow_rate} barrels per day")
-------------------------------------------------------
#python #engineering #polltime