Why output this short code is over 1? What's the problem? | Sololearn: Learn to code for FREE!
+ 1

Why output this short code is over 1? What's the problem?

https://code.sololearn.com/cO1kHoxFZNEu/?ref=app

1st Nov 2018, 6:51 PM
hossein esmaeily
hossein esmaeily - avatar
5 Antworten
+ 7
add "f = lambda sigma: " before the line, and call the function with "f(x)", where x is your variable and... i tried 1~20, and it's smaller than 1 and decreases🤔
3rd Nov 2018, 2:44 AM
Flandre Scarlet
Flandre Scarlet - avatar
+ 4
I'm confused. 1. You didn't import math. 2. If sigma is a variable, you never assigned it any value. 3. You didn't print anything, so there's not supposed to be any output.
2nd Nov 2018, 6:30 AM
Kishalaya Saha
Kishalaya Saha - avatar
+ 2
What is sigma?
1st Nov 2018, 8:27 PM
Roneel
Roneel - avatar
+ 2
Kishalaya Saha i tried 1) and 3) on my own as we can understand but 2) hurts more.
2nd Nov 2018, 6:04 PM
Roneel
Roneel - avatar
0
Sigma is a variable
1st Nov 2018, 8:38 PM
hossein esmaeily
hossein esmaeily - avatar