prompter: How do I get the power of a number in python? assistant: To get the power, or exponent of a number in Python, you would need to write the following code:

number = int(input("Enter a number: "))
power = int(input("Enter the exponent: "))
print(number ** power)

In this code, the user is asked to input the number, and the power/exponent to raise the number to. The number is then raised the exponent/power they specified, and then printed on the screen. prompter: Make the code into a function that takes the number and exponent as parameters and returns the result. assistant: Here you go:

``` python
def power(number, exponent):
    """Get number to the power of exponent."""
    return number ** exponent
```
prompter: Could you also annotate type so that its parameters are guaranteed to be number and not arbitrary types such as string?