Question: When a ball is thrown vertically up in the air from a specified height 0 above the ground at an initial specified velocity 0, its
When a ball is thrown vertically up in the air from a specified height 0 above the ground at an initial specified velocity 0, its subsequent height, h, at any time, t, can be calculated using the following equation:
() = 0 + 0 1/2 t^2
in which,
0: is given initial height in m
0: is given initial velocity in /s
: gravitational constant = 9.806 m/s^2
: time in seconds, s.
And its subsequent velocity, , at any time, is calculated using the following equation:
() = 0
Write a Python program that calculates the height, and the velocity, at any time given initial velocity, 0 and initial height, 0 from which the ball was thrown up vertically.
When your program runs, the input and output should look as shown. Last output is for time = 25 seconds, due to that fact that at second 26, the height will be negative, and it will be below reference level zero. Use an if statement to handle this circumstance.

This program calculates the heigh and velocity as a function of time for a ball that is thrown vertically up in the aif from an initial height, ho above the ground PleaseEnterstartTimeinSeconds:PleaseEnterEndTimeinSeconds:PleaseEnterInitialHeightinmeters:PleaseEnterInitialVelocityinmeter/second:05000125 Press to Exit Program
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
