What will be printed in the console when the following code is run?

DO NOT run the code, just pretend to be a computer.

def a_function(a_parameter):
    a_variable = 15
    return a_parameter

a_function(10)
print(a_variable)

1
2
3
4
1

NameError

What will be printed in the console when the code is run?

DO NOT run the code, just pretend to be a computer.

i = 50
def foo():
    i = 100
    return i

foo()
print(i)

1
2
3
4
2

50

What will be printed in the console when the following code is run?

DO NOT run the code, just pretend to be a computer.

def bar():
    my_variable = 9

    if 16 > 9:
      my_variable = 16

    print(my_variable)

bar()

1
2
3
4
2

16