This is python. plz let me know how to make a code for this. Activity #1: Plotting Curves and Derivatives - to be done as a team As a team,

program that will ask a user for a polynomial (of arbitrary degree) and then generate a plot of the curve, its derivative curve, and its second derivative curve. Plot all three on the same axis so that it is easy to see how the first and second derivatives affect the shape of the curve. You must also highlight local maxima and minima by drawing points on the plots showing where these occur. You may use code developed in prior assignments if it is helpful. · The user should enter the polynomial as a set of coefficients. Have the user enter all coefficients in one line with a single space in between. Coefficients should be entered in order from the highest order term to the lowest. · You should determine the derivatives analytically. In other words, if you have a list of the coefficients of the original polynomial, you should be able to generate the first and second derivatives exactly. You may want to look back at Lab 5a Activity #2 for this. · Plot the lines over the interval [-5, 5]. You can generate your plots by sampling many points on the curves and plotting a line connecting those points. You may want to use numpy for this. · You must identify the local maxima and minima in the range you are plotting. You can

do

by looping through the points generated for your plot, and finding points that are local maxima (a point is greater than those just before and after) and local minima (a point is smaller than those just before and after). These points should be plotted individually on top of the plots of the curves. Find the local maxima and minima for all three curves. · Your plots for the three curves and the maxima/minima should be sufficiently varied (in color/shape) so that it is easy to distinguish one from another. Think about how someone that is colorblind will view your plot. Follow the process below: Complete parts a and b before writing any code! a) First, you will practice generating a bottom-up design. 1. As a team, brainstorm what functionality you are likely to need in this program. For each basic task your team comes up with, where all the pieces needed are already known, write down a short function description, along with any input arguments needed, and what return value there will be, if any. Put this information into a document named Lab12a_Act1.pdf. 2. Only

do

for basic functions for which the steps you will need to follow are well-known or obvious. You can consider functions that will call other functions, as long as you have first designed the other functions. 3. Your goal in this part is not to generate a complete code design, but rather to identify functions to implement that are likely to be helpful in your program. b) Next,

top-down design of the program. 1. Add to your previous document a hierarchy outlining the top-down design that your team comes up with. 2. You should make use of the functions created in the bottom-up "phase", above, to whatever extent seems helpful. c) Next, write the python code for your program. Name the file Lab12a_Act1.py. 1. As a team, you will need to decide what variables you will use in the main program. 2. You should create separate functions for each of the "nodes" in the top-down hierarchy that you created. 3. You should also create separate functions for the features you identified in the bottom-up phase (a), above. 4. Be sure to include docstrings for all the functions you create! 5. Note that you might want to split up the coding responsibilities for the different functions among different team members. If you did a good job with the design, you should be able to code up the individual functions independently of one another.

**252,291 students got unstuck** by Course

Hero in the last week

**Our Expert Tutors** provide step by step solutions to help you excel in your courses