Python function that adds two numbers: a and b. Return a + 1, if no value is provided for b.
def sum(a,b):
if b is None:
return a + 1
else:
return a + b
print(sum(3,2))
I tried print(sum(2))
Then --> TypeError: sum() missing 1 required positional argument: 'b'
b == None? b is None? ... How can i fix it?
Thank you in advance!!