Question: Making your function more flexible Now, the above function is great for computing x, but what if I wanted a function that could more generally

Making your function more flexible Now, the above function is great for computing x, but what if I wanted a function that could more generally compute the values for a list of x -values raised to any power? As a group, design a small function called compute_exponent that satisfies the following 1. Given a list of x-values, it computes the value of x for each value, where a is a parameter that is fed into your function. 2. The default value of a is "2" 3. It returns the list of all the x" values. Make sure you print out the list of resulting values to confirm that your code is working. Run your function for a variety of input values. In [ ]: # WRITE PSEUDO-CODE HERE (in the form of comments) In [9]: | # Put your code here def compute_exponent (a,n): compute the exponent of 'a'given'n' if n
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
