Ultimate access to all questions.
Upgrade Now 🚀
Sign in to unlock AI tutor
What will be the output of the following Python function when called with my_func(1, 2)?
my_func(1, 2)
def my_func(x, y=1): if x < y: x = 2 * x if x == y: x += 1 y -= 2 return (x, y)
A
(2, 1)
B
(1, 2)
C
(3, 0)
D
(1, 1)
E
(2, 2)