Question: python program. The following equations x = v*t* cos(0) 9 = + 10 + t = sin(0) 0.5 k g * t are used to
python program.
The following equations x = v*t* cos(0) 9 = + 10 + t = sin(0) 0.5 k g * t are used to calculate the x and y coordinates of a projectile object at time t, given the object's initial velocity, vand angle, with initial position x = 0 and y = h. Note: In this equation, the value of O is in radian and 1 = (10/180) Write the following functions 1. Convert_degree_to_radian(angle): The parameter value is in degree and calculates the radian value for the angle. Then returns the radian angle value. 2. new_co_ord(t, theta, v, g, h): Calculates the x and y coordinates of the object at time t using the equations above. Here h is the objects initial height (i.e. initial y co- ordinate) Then returns the newly calculated x and y co-ordinates. 3. Driver(): a. Asks the user for the object's initial velocity, angle, and height (y position)
b. Convert the angle to radian by calling appropriate function and saving the return value in a variable c. Prints the object's position for every second until the object's y position is no longer greater than 0 (meaning the object fell back to Earth). The position of the object at every second should be shown in the following format: Time seconds x = y = Sample Input: Launch angle (deg): 45.0 Launch velocity (m/s): 100.0 Initial height (m): 3.0 251 Sample Output: Time 1 X = O y = 3 Time 2 x = 71 y 69 Time 3 x = 141 y = 125 Time 4 x = 212 y = 171 Time 5 x = 283 y = 207 Time 6 x = 354 y = 234 Time 7 x = 424 y Time 8 x = 495 y = 258 Time 9 x = 566 y = 255 Time 10 x = 636 y = 242 Time 11 x = 707 y = 220 12 x = 778 y 187 Time 13 x = 849 y 145 Time 14 x = 919 y = 93 Time 15 x = 990 y = 32 Time
b. Convert the angle to radian by calling appropriate function and saving the return value in a variable c. Prints the object's position for every second until the object's y position is no longer greater than 0 (meaning the object fell back to Earth). The position of the object at every second should be shown in the following format: Time seconds x = y = Sample Input: Launch angle (deg): 45.0 Launch velocity (m/s): 100.0 Initial height (m): 3.0 251 Sample Output: Time 1 X = O y = 3 Time 2 x = 71 y 69 Time 3 x = 141 y = 125 Time 4 x = 212 y = 171 Time 5 x = 283 y = 207 Time 6 x = 354 y = 234 Time 7 x = 424 y Time 8 x = 495 y = 258 Time 9 x = 566 y = 255 Time 10 x = 636 y = 242 Time 11 x = 707 y = 220 12 x = 778 y 187 Time 13 x = 849 y 145 Time 14 x = 919 y = 93 Time 15 x = 990 y = 32 Time
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
