logo CodeStepByStep logo

carbonated

Language/Type: Python parameters print

What output is produced by the following program?

def carbonated(coke, soda, pop):
    print("say", soda, "not", pop, "or", coke)

def main():
    soda = "coke"
    pop = "pepsi"
    coke = "pop"
    pepsi = "soda"
    say = pop

    carbonated(coke, soda, pop)
    carbonated(pop, pepsi, pepsi)
    carbonated("pop", pop, "koolaid")
    carbonated(say, "say", pop)

main()
line 1
line 2
line 3
line 4

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.