Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

use python in spyder software to solve 3) Write a Python program that calls the functions compute Trajectory from question 3 to compute the trajectory

use python in spyder software to solve image text in transcribed
image text in transcribed
3) Write a Python program that calls the functions compute Trajectory from question 3 to compute the trajectory of a projectile defined by the quadratic equation y(x)=ax'+bx+c. DO NOT rewrite computeTrajectory here! Input the integer number of intervals. Loop as long as the number of intervals is greater than zero. Input the launch angle of the projectile in degrees as a float. If the launch angle is less than or equal to zero display an error message that includes the launch angle as shown in the sample run of the program. Otherwise compute the values of a, b, c and distance using the following equations. ;b =tan();c = yo: distance = zvcos(0)2 -b-vb2-4ac 20 where G is gravity at 9.81 m/s? Vo is the initial velocity of 25.25 m/s, is the launch angle in degrees, yo is the initial height of 2.1 meters and distance is the horizontal distance the projectile travels in meters. Call compute Trajectory to get the list of X and Y coordinates. Display the heading shown in the sample run of the program. In a loop, display the corresponding X and Y coordinates that define the points along the trajectory to 4 decimal places in 12 character positions, one pair of values per line of output Be sure to include any import statements required by the program. A sample run of the program is shown below. Enter the number of intervals ( 0): 0 The launch angle, 0, must be greater than zero! Enter the number of intervals - 0 to quit): 10 Enter the launch angle of the projectile (>0): 37.25 X coordinate y coordinate 0.0000 2.1000 6.5277 6.5464 13.0554 9.9580 19.5831 12.3349 26.1108 13.6771 32.6385 13.9844 39.1662 13.2571 45.6939 11.4949 52.2215 8.6980 58.7492 4.8664 65.2769 0.0000 Enter the number of intervals ( 0): 0 The launch angle, 0, must be greater than zero! Enter the number of intervals - 0 to quit): 10 Enter the launch angle of the projectile (>0): 37.25 X coordinate y coordinate 0.0000 2.1000 6.5277 6.5464 13.0554 9.9580 19.5831 12.3349 26.1108 13.6771 32.6385 13.9844 39.1662 13.2571 45.6939 11.4949 52.2215 8.6980 58.7492 4.8664 65.2769 0.0000 Enter the number of intervals (

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

What is Change Control and how does it operate?

Answered: 1 week ago

Question

How do Data Requirements relate to Functional Requirements?

Answered: 1 week ago