Ask your own question, for FREE!
Mathematics 17 Online
OpenStudy (anonymous):

Which is the better factorial function? def fact(x): ans = 1 n = 2 while n <= x: ans *= n n += 1 return ans or fact = lambda x: x * fact(x - 1) if x > 1 else 1 or from math import factorial Which is the better factorial function? def fact(x): ans = 1 n = 2 while n <= x: ans *= n n += 1 return ans or fact = lambda x: x * fact(x - 1) if x > 1 else 1 or from math import factorial @Mathematics

OpenStudy (anonymous):

where did you ask about delta squared?

OpenStudy (anonymous):

i found it , you asked agdgdgdgwngo 4 Good Answer (define (square) (lambda (x) (* x x)))

OpenStudy (anonymous):

this one is better def fact(x): ans = 1 n = 2 while n <= x: ans *= n n += 1 return ans because other one does recursion and recursion requires more memory

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!