How does it know what values to use for each parameter?
Before you call the function, the program has no way of knowing what the values will be, unless you set a default by typing
parameter_name=0, for example. That would set the default value of parameter
Otherwise it simply assigns parameter values with the arguments provided when the function is called. With
power(), the function defined and used in this exercise, we provide it two arguments: a base and an exponent, in that order. If we did
power(10, 2), then
10 would be assigned to
2 assigned to
exponent to be used throughout the function with those values.