logo CodeStepByStep logo

parameter_mystery1

The following code produces 5 lines of output. What is the output? Write each line of output as it would appear on the console.

null
def main():
    x = "happy"
    y = "pumpkin"
    z = "orange"
    pumpkin = "sleepy"
    happy = "vampire"

    orange(y, x, z)
    orange(x, z, y)
    orange(pumpkin, z, "y")
    z = "green"
    orange("x", "pumpkin", z)
    orange(y, z, happy)

def orange(z, y, x):
    print(y + " and " + z + " were " + x)

main()

line 1
line 2
line 3
line 4
line 5

You must log in before you can solve this problem.

Log In

Need help?

Stuck on an exercise? Contact your TA or instructor.

If something seems wrong with our site, please

Is there a problem? Contact us.