def dot(vector_a, vector_b):
    """
    Checks to see if the two vectors are of the same dimension, raising a
     value error if not, and returns the dot product of them if so
    :param vector_a: a vector to be dotted
    :param vector_b: the other vector to be dotted
    :return: the dot product of vector_a and vector_b
    """

    if not vector_a.mDim == vector_b.mDim:

        raise ValueError("Can only use dot product on vectors of the same dimension.")

    else:
        product = 0

        for i in range (0, vector_a.mDim):

            product += vector_a[i] * vector_b[i]

        return product