Jupyter Snippet CB2nd 06_high_quality

Jupyter Snippet CB2nd 06_high_quality

Writing high-quality Python code

def power(x, n):
    """Compute the power of a number.

    Arguments:
    * x: a number
    * n: the exponent

    Returns:
    * c: the number x to the power of n

    """
    return x ** n
# Imports
# -------
import numpy

# Utility functions
# -----------------


def fun():
    pass