logo CodeStepByStep logo

strange3

Language/Type: Python functions mystery print

What is the output produced from the following program? (This is the same as the strange program, except with different contents of the main function.)

def first():
    print("Inside first function")

def second():
    print("Inside second function")
    first()

def third():
    print("Inside third function")
    first()
    second()

def main():
    second()
    first()
    second()
    third()

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.