+ on the first line and 3 on the second.
def apply(op, a, b):
if op == "+":
return a + b
elif op == "*":
return a * b
return "?"
op = input()
x = input()
print(apply(op, x, x), apply("-", 1, 2))
What does the program print?Log in to join the discussion.
Loading…