logo CodeStepByStep logo


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

def main():
    a = "felt"
    b = "saw"
    c = "drew"
    saw = "sue"
    drew = "b"

    mystery(a, b, c)
    mystery(b, a, saw)
    mystery(drew, c, saw)
    mystery("a", saw, drew)
    mystery(a, a, "drew")

def mystery(b, a, c):
    print(c + " " + a + " the " + b)

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.