1. Engineering
  2. Computer Science
  3. making your function more flexible now the above function is...

Question: making your function more flexible now the above function is...

Question details

Making your function more flexible Now, the above function is great for computing x2, 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.
Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution