What do you return at the end? You need to make a sum, that's all (summation of every number from 1 to num isn't it clear enough?). Also, please use markdown tags to format your code or it's very discomfortable to read, see: how-to-format-code-in-markdown. Indentation is fundamental in Python, we can't even know if your code is syntactically correct.
Don't use
input()
, use the function's argument to get the input value.What do you return at the end? You need to make a sum, that's all (summation of every number from 1 to num isn't it clear enough?). Also, please use markdown tags to format your code or it's very discomfortable to read, see: how-to-format-code-in-markdown. Indentation is fundamental in Python, we can't even know if your code is syntactically correct.
Capitalize each word yourself, and remove
print
betweenreturn
and what you want to return, that's what's making your function returnNone
.