Question: Struggling writing this program in python - if you can point me in the right direction, would appreciate it! (I'm an older student, so perhaps
Struggling writing this program in python - if you can point me in the right direction, would appreciate it! (I'm an older student, so perhaps brain cells are duller!) Write a program to provide information on the height of a ball thrown straight up into the air. The program should request as input the initial height, h feet, and the initial velocity, v feet per second. The height of the ball after t seconds is h+vt?16t^2 feet. The program should perform the following two calculations: Determine the maximum height of the ball. Note: The ball will reach its maximum height after v/32 seconds. Determine approximately when the ball will hit the ground. Hint: Calculate the height after every .1 second and determine when the height is no longer a positive number. A function named getInput should be used to obtain the values of h and v and that function should call a function named isValid to ensure that the input values are positive numbers. Each of the tasks (a) and (b) should be carried out by functions.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
