Ask your own question, for FREE!
Mathematics 7 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!
Latest Questions
Arriyanalol: i need help
1 day ago 7 Replies 1 Medal
Arriyanalol: CONGRATS to me
1 day ago 8 Replies 2 Medals
Legomaster346: What colleges are good that are near Arab Alabama?
1 week ago 5 Replies 0 Medals
Arriyanalol: i need help
1 week ago 6 Replies 2 Medals
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!