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

Dear friends. It is still going over my head as greyhound. This is no bueno...... Problem set 3, I can't understand and it is due tomorrow....

OpenStudy (anonymous):

Where are you stuck? Is there a specific question? The instructions seemed quite clear to me!

OpenStudy (anonymous):

chris2332 what's wrong with this code: def evaluatePoly(poly, x): ''' Computes the value of a polynomial function at given value x. Return that value as a float. poly: list of numbers, length > 0 x: numbers returns: float ''' if (len(poly)== 0): return float(0) result = float(poly[0]) index = 1 while index!=len(poly): result += poly[index]*x**index index += 1 return result

OpenStudy (anonymous):

What's the error you are getting?

OpenStudy (anonymous):

The while block and the last return statement needs indentation!

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!