Question: Now half of python code is given, and i have to expand that code, according to the questions requirement. Python code is in picture below

 Now half of python code is given, and i have to

Now half of python code is given, and i have to expand that code, according to the questions requirement. Python code is in picture below

expand that code, according to the questions requirement. Python code is in

3. This should be done in python. During volcanic eruptions, rocks and other material are thrown out. We should imagine that a stone is thrown out. We should calculates and plot the position (horizontally and vertically) of this rock through the hover when we neglect air resistance. We can imagine a coordinate system with a x and y axis where positive will be upwards. The point where the stone leaves the vulcno is defined as origo (x=0,y=0), and at the same time have an initial velocity vector given by the components Vx0=25.0m/s and Vy0=80m/s, respectively, horizontal and vertical direction. a) The stone that is thrown out will reach a maximum height that can be calculated by hand. First you must however, extend the Python program by defining a function "find_max_height". This should have the array "yn as input parameter, where "yn contains all calculated heights through hovered. The function should return the largest height found, and this height ("Max_height") is then printed from the main program. The function is finally called in the program (since all the heights are then in "y"). To check the result, compare with the plot generated, as well as compare with what you get when you calculate the maximum height by hand (using the "standard formulas" from physics book). Finally, if you change "n=200" in the code to " n=9 " and run the program again. Why will there then be poorer compliance with hand calculation? Explain briefly. b) In hovering, the velocity vector of the stone will change direction. Define a function "Find_position_given_angle" which finds and prints the x and y coordinates where the stones velocity vector has a desired direction (i.e. angle relative to positive x-axis). In the call on function (at the very bottom of the program) we let this direction here be 20 degrees. Assume that this angle is obtained on the up", ie before the stone reaches its peak. The function should have as input parameters the arrays x and y", the time step "dtw, desired direction on the speed vector requested_anglen, as well as largest acceptable deviation error_limits betweencalculated angle and desired angle (we use 0.4 degrees here, as already set in the call on function). The function should not return any values, but just print x and y the coordinates where the angle is "correct", ie where the calculated angle is between "Requested_angle - error_limit" and "requested_angle + error_limit

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!