Caller names versus parameter names

A student writes the short Python program below to test a function that raises a number to a power. What does the program print when it runs?


Python
def power(base, exponent):
    return base ** exponent

exponent = 3
base = 2
print(power(exponent, base + 2))
Choose an answer

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Parameters and Arguments Questions: