Question: Write a functional programme in Python: A ball thrown at an angle with initial speed vo on Earth follows a trajectory where g 9.81 ms2,
Write a functional programme in Python:
A ball thrown at an angle with initial speed vo on Earth follows a trajectory where g 9.81 ms2, speed in units of ms1 and an initial height yo in metres. Set yo 0 and write a function 'trajectory0' that has three input variables: xdata (a list), speed and angle (constant numbers each, angle in degrees) in that order Return the calculated list of height values, f(x), containing only positive or zero values for the ball height, i.e. remove all negative values before returning the resulting list. The maximum height at given speed and angle will be tested. You can test your function with Spyder by writing a test function, calling your trajectory function with a speed of 20 ms-1, an angle of 45 degrees and a list made from the python function 'range(100). Printing the maximum of the list with'max(result)' where result is the output of the trajectory function should yield 10.19 in this example
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
