Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 23305

why my python code give me this error : TypeError: unsupported operand type(s) for +: 'int' and 'NoneType [closed]

$
0
0

Edit

the problem was with my indentations

Original question

I am new user in Python, I have a problem with the None type, I looked different question, but the problem persists.

my code is calculate factorial

def fact(k):     if k > 0:         result = k + fact(k-1)         print(result)     else:         result=0     return resultfact(3)

Viewing all articles
Browse latest Browse all 23305

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>