Increment Parameter by one
Write a function from scratch named increment_parameter_by_one
that receives only one numeric parameter and returns that parameter incremented by one. You are in charge of writing the whole function body + definition.
The function should be used in this way:
two = increment_parameter_by_one(1)
print(two) # 2
fifteen = increment_parameter_by_one(14)
print(fifteen) # 15
print(increment_parameter_by_one(22)) # 23
Solution 1
def increment_parameter_by_one(param):
return param + 1