Question: Please do 1,2, and 3 using Python. Make sure that your scripts run without error in order to get credit. Do not hesitate to ask

Please do 1,2, and 3 using Python.

Please do 1,2, and 3 using Python. Make sure that your scripts

Make sure that your scripts run without error in order to get credit. Do not hesitate to ask for help if needed! We'll be working on the projectile problem described in Lecture Notes 04. Again, the specific problem is the following: A stone of mass m = 200 g and linear dimension L = 6 cm is thrown from an initial height ho = 1.54 m at an initial speed vo at an angle 6o above the horizontal. Calculate its landing point. All of what follows should be done in a single Python script file to be submitted on Canvas. We now want to get numerical values for different initial velocities 7o (i.e., speed vo and angle 00). We'll follow the following steps (although this is not the only way to do it): Step 1 Define variables for the quantities that will not change. That is m, L, ho, and g. (Note that we might not use all of them for this assignment, but let's define them anyway.) Let's all agree to use g = 9.80 m/s2. Include a comment next to each variable specifying the units in which these quantities are expressed and what they represent! Step 2 Define a function xdist of 2 variables, vo and thetao, that will return the "range" or horizontal distance to the landing point. (We already solved for this in the notes, Eq. 7, so you just need to code the equation.) The function will be called by providing the launch angle in degrees since this is easier for us to visualize. Be careful to consider what the trigonometric functions in the Python math module expect... Be sure to make use of the documentation line (docstring) in the function definition to describe carefully what your function does. This is good practice for real-world programming where you must comment everything. Step 3 Evaluate that function for at least six different combinations of values of vo and theta. Use a calculator and CHECK that your function is working properly for at least one of the combinations. If not, go back to Step 2 and find your error. Print out the results of your tests and include in this information what input values were used to generate each result. For example, For v0 = 8.00 m/s and thetao = 20.90 degrees, the range is 6.898 m

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!