power(base: float, exponent: int = 2) -> float that returns base raised to exponent, annotated exactly as shown (base is a float, exponent is an int defaulting to 2, return type is float). Type hints are documentation only in Python — your implementation must still behave correctly at runtime.power(3.0)
9.0
Exponent defaults to 2, so 3.0 ** 2 = 9.0.
power(2.0, 3)
8.0
2.0 ** 3 = 8.0.
Annotation syntax: def f(x: int, y: str = "a") -> bool:
The ** operator computes exponentiation.