def dot(x, y):
    """Calculates the scalar product between two vectors x and y.

    The scalar product is the sum of the products of each individual elements.

    Args:
        x: The left multiplicand.
        y: The right multiplicand.

    Returns:
        The sum of all z_i for which z_i = x_i * y_i holds.
    """
    result = 0
    for i, x_i in enumerate(x):
        result = result + x_i * y[i]
    return result