A function to plot Drag force vs Velocity
\"\"\"
Function to plot Drag force vs Velocity
\"\"\"
import matplotlib.pyplot as plt
# Inputs
#Drag co-efficient
c_d = 0.8
# Frontal area (m^2)
A = 0.1
# Density (kg/m^3)
rho = 1.2
# Bicycle Velocity
velocities = [5,6,7,8,9,10,11,12]
drag_forces = []
for velocity in velocities:
drag_forces.append((0.5*rho*A*c_d*velocity*velocity))
plt.plot(velocities, drag_forces)
plt.xlabel(\'Velocity\')
plt.ylabel(\'Drag force\')
plt.show()