logo CodeStepByStep logo

strange2

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 third function.)

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

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

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

def main():
    first()
    third()
    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.