Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 exampleStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started