61.1k views
2 votes
For Questions 1-4, consider the following code: def mystery1(x): return x + 2 def mystery2(a, b = 7): return a + b #MAIN n = int(input("Enter a number:")) ans = mystery1(n) * 2 + mystery2 (n * 3) print(ans)

What is the output when the user enters -4?
What is the output when the user enters 3?
What is the output when the user enters -2?
What is the output when the user enters 9?

1 Answer

4 votes

Answer:

What is the output when the user enters -4?

-9

What is the output when the user enters 3?

26

What is the output when the user enters -2?

1

What is the output when the user enters 9?

56

Explanation: Just did it and got all correct. Hope it helps!!

User Adrian Regan
by
5.3k points