NP Code Competition

# Basic Math

Back to Problem Listing
Write a function called do_this with 3 parameters: a number, a string, and a number (in that order). The string will be any one of the following:
- "subtract"
- "divide"
- "multiply"
- "to the power of"
- "SHAZAM"

If the string is "add", add the two numbers and return the result.
If the string is "subtract", subtract the 2nd number from the 1st number and return the result.
If the string is "divide", divide the first number by the 2nd number and return it. Do not truncate the value.
If the string is "multiply", multiply the two numbers togeter and return the result.
If the string is "to the power of", raise the first number to the power of the 2nd number.
If the string is "SHAZAM", ignore the numbers and return the string "potato".
Exceptions:
- If you divide anything by 0, return the string "undefined".
- If you raise 0 to the 0th power, return the string "indeterminate".
- If you add 1 and 1, return 11

## Sample

```>>> do_this(5, "add", 7)
12
>>> do_this(10, "divide", 3)
3.3333333333333333
>>> do_this(3, "subtract", 9)
-6
>>> do_this(2.5, "multiply", 90)
225.0
>>> do_this(3, "to the power of", 5)
243
>>> do_this(1, "divide", 0)
"undefined"
>>> do_this(0, "to the power of", 0)
"indeterminate"