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

Problem Set 2 - Problem 2 given solution is flawed The solution given for this problem doesn't satisfy the assignment requirements. First, it returns a list instead of a tuple as required. Second, it doesn't check if a derivative is 0 to return (0.0,) as required - it simply checks the size of the polynomial, and if it's less than 2 returns (0.0,), but ignores the case when all coefficients are 0 in a length > 1 polynomial and still returns a list of several zeroes. For example, for an input of (0.0, 0.0, 0.0) it would return [0.0, 0.0]. Correct solution: http://pastebin.com/QsBUHSmZ

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!