Predict the returned value
by Tracy '23
def plus_or_minus(b):
if b > 10:
return b + 2
if b <= 10:
return b - 1
Function Call | Return Value | |||
---|---|---|---|---|
plus_or_minus(8) | → | |||
plus_or_minus(-12) | → | |||
plus_or_minus(10) | → | |||
plus_or_minus(0) | → | |||
plus_or_minus(15) | → | |||
plus_or_minus(11) | → | |||
plus_or_minus(-5) | → |
Experiment with this code on Gitpod.io