My very simple python function is returning \'None\' at the end of it and I\'m not sure quite why. I\'ve looked at some other posts and still can\'t figure it out. Any help
You are not returning anything in the function printmult
, therefore when you print the result of printmult(30)
it will be None
(this is the default value returned when a function doesn't return anything explictly).
Since your method have a print
statement inside and it's not supposed to return something (usually when a method names is something like printSomething()
, it doesn't return anything), you should call it as:
printmult(30)
not
print(printmult(30))