- 1
helep mehhhhh
https://code.sololearn.com/cw3ta1FVeBMI/#py meh cod lol
3 Answers
+ 4
You printing value inside your function, thats why you got None, place return except print inside function.
When you dont return anything you get None
+ 4
Because there are two print statements. First is inside function and second is outside function. When a function doesn't return anything, it implicitly returns None.,Because of double print function. I suggest you to use return instead of print inside the function definition.
def c(n,l):
return n+l
n = 8
l = 2
print(c(n,l))
https://code.sololearn.com/cYC1W4E28Rbh/?ref=app
0
thx guys