47.5k views
0 votes
create a function that has an argument is the triple jump distance. It returns the estimate of vertical jump height. The world record for the triple jump distance is 18.29 meters by Johnathan Edwards. What's our prediction for what Edwards' vertical jump would be

User Henry Yik
by
3.6k points

1 Answer

2 votes

Answer:

function predicting vertical

def predict_vertical(triple):

# using least squares model parameters

ls_vertical = ls_slope*triple + ls_intercept

return ls_vertical

# Johnathan Edwards prediction

triple = 18.29 # m

vertical = predict_vertical(triple)

print("Edward's vertical jump prediction would be {:.2f} meters.".format(vertical))

plt.legend(['linear regression','least squares','data'])

plt.grid()

plt.show()

Step-by-step explanation:

create a function that has an argument is the triple jump distance. It returns the-example-1
User Matt Hamrick
by
3.8k points