Question: I have to code the trajectory of a projectile using python. The code is almost done, I just have to solve this last part: Since

I have to code the trajectory of a projectile using python. The code is almost done, I just have to solve this last part:

"Since it is extremely unlikely to have a timestep end exactly with y=0, you should linearly interpolate between the last two points to determine where y becomes zero."

To find where the projectile hits the ground accurately, I have to interpolate the last two points. However, the points (x,y) are in lists and I do not know how I can get the values SEPARATELY in order to interpolate.

Any help is much appreciated, TIA

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!