Apr-17-2017, 09:15 AM
Well, your function prints the sum of the two arguments but after that, the function returns None which print() is printing. A function returns None if you don't specify something else.
You can just call the function or to return the sum
Returning the sum
You can just call the function or to return the sum
Returning the sum
x=int(input('the first number')) y=int(input('the second number')) def suma(a,b): return a+b print(suma(x, y))Just call the function.
x=int(input('the first number')) y=int(input('the second number')) def suma(a,b): print(a+b) suma(x , y)