logo CodeStepByStep logo

tricky

Language/Type: Python functions mystery print

What is the output produced from the following program?

def main():
    message1()
    message2()
    print("Done with main.")

def message1():
    print("This is message1.")

def message2():
    print("This is message2.")
    message1()
    print("Done with message2.")

main()
output

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.