Python3 summation | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

Python3 summation

I want to use the gamma function on this summation and thiS what I have so far: from functools import reduce import numpy print(int(reduce(lambda x,y: x+y, [1,2,3,4]))) What should I do from now?

9th Mar 2020, 10:52 PM
Norm
Norm - avatar
3 Answers
+ 1
I'm sorry if I didn't understand, but I believe you would do this: from functools import reduce from math import gamma print(gamma(int(reduce(lambda x, y: x + y, [1, 2, 3, 4])))) The result would be 362, 880.
12th Mar 2020, 10:54 PM
Jianmin Chen
Jianmin Chen - avatar
+ 2
thank you!
12th Mar 2020, 11:28 PM
Norm
Norm - avatar
+ 1
imma follow u
12th Mar 2020, 11:28 PM
Norm
Norm - avatar