0
plz explain me why things happen like that in these 4 cases:
1) def lust(no): return no + 69 return no - 69 print(lust(45)) doesnt give me value of no-69 2) def lust(no): return no + 69 return no - 69 lust(45) doesnt give any value 3) def lust(no): print(no + 69) print(no - 69) print(lust(45)) gives none at last 4) def lust(no): return no + 69 print(no - 69) print(lust(45)) gives only 114
4 ответов
+ 1
1)
After function call, the first return statmend returns no+69. That's it. The second return will never reached.
0
2) this is without any print statemend. You will see nothing.
0
3)
Is a function without a return statemend. Python functions will then return "None" by default.
0
4)
Same as in 1). After First return statemend the function ends. The print statemend will never reached.