Question: Using Thonny for the following Question: Write a program to provide information on the height of a ball thrown straight up into the air. The

Using Thonny for the following Question:

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:

(a) Determine the maximum height of the ball. Note: The ball will reach its maximum height after v/32 seconds.

(b) 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.

Answer should come out as:

Using Thonny for the following Question: Write a program to provide information

Enter the initial height of the ball: 5 Enter the initial velocity of the ball: 34 The maximum height of the ball is 23.06 feet. The ball will hit the ground after approximately 2.27 seconds. 8 8

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!