Question: Using Python You are standing on a tall tower. You lean over the edge and throw a ball vertically into the air at a velocity

Using Python

You are standing on a tall tower. You lean over the edge and throw a ball vertically into the air at a velocity of 25m/sec and want to model it's position and velocity through time. Write a Python program that defines a function SolveMotion() that takes as input 1) initial velocity (m/sec), 2) current time (sec) and returns a position (relative to where the ball was released) and velocity (m/sec), using the following equations of motion:

y(t) = v0*t (1/2)gt2

v(t) = v0 gt

where y=position (m), v=velocity (m/s), v0=initial velocity, t=time (s), g=gravitational constant (9.8m/s/s)

Using this function, create a figure with two plots, side by side. The first should be a smooth plot of position vs. time, and the second velocity vs. time, for an initial velocity of 25 m/sec and a time interval of [0,10] seconds

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!