def power(base, exponent): # Add your parameters here!

result = base**exponent

print "%d to the power of %d is %d." % (base, exponent, result)

power(base, 37) # Add your arguments here!

power(4)

def power(base, exponent): # Add your parameters here!

result = base**exponent

print "%d to the power of %d is %d." % (base, exponent, result)

power(base, 37) # Add your arguments here!

power(4)

here:

`power(base, 37) # Add your arguments here!`

base should be the actual base value, which seems to be 4. Don't know why you added that on another function call. Doesn't work that way

lets do an example function:

```
# function with parameter a and b
def add(a, b):
return a + b
# function call with arguments
print add(5,3) # prints 8
```

unfortunately is not so strict in the terms, but we declare a function with parameters `a`

and `b`

, then we call the function with arguments to satisfy the parameters. (so a will now have a value of 5, and b a value of 3)

**so how do I fix this**

def power(base, exponent): # Add your parameters here!

result = base**exponent

print "%d to the power of %d is %d." % (base, exponent, result)

power(base, 37) # Add your arguments here!

power(4)

i covered that? at function call, you need to supply an actual value (4) for base parameter.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.