Ask your own question, for FREE!
MIT 6.00 Intro Computer Science (OCW) 7 Online
OpenStudy (tyler1989):

i dont quit understand the ps2, what do they ask me to do?

OpenStudy (kizolk):

I'm guessing you're speaking of the first problem, about polynomials etc.? If so, to truly understand what it is you're doing you have to have some mathematical knowledge about functions and their derivatives. It'd be hard to explain it to you without knowing exactly what it is you don't understand. That said, even without understanding the details, you can do the PS2, as long as you follow the specifications of the functions you have to implement. I realize this is not a super helpful answer; maybe you could ask a more specific question?

OpenStudy (anonymous):

I just go done reading the problem statement. I think I have a good idea how to do the program, but the proof will be in the pudding. To begin with, you have to write the function evaluate_poly(poly, x). You pass the polynomial and value of x to it by representing the polynomial by poly = (0.0, 0.0, 5.0, 9.3, 7.0) and setting x = -13. After you set the values of your poly and x in your program, put in a command print evaluate_poly(poly, x). Also, don't forget at the end of the function that you define, put in a return statement that will return the value of the polynomial that you evaluated back to the main program. Otherwise, you will probably get "None" as the response to your print statement. You can figure out what power to raise each term in your polynomial to by its index in the tuple. The places in the tuple are evaluated 0, 1, 2, 3, etc. So the term 5.0 in the tuple above is 5.0*x**2 because the index for the third term is 2. Be warned that this is all conjecture on my part, as I won't begin work on the program until I am sitting in front of the big screen and watching football on New Year's Day! I hope this gives you a start. If I'm leading you down the primrose path, I apologize in advance!

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!