import math


def pythag(x, y):
    """
    pythag performs the pythagorean equation to calculate distance from the origin for a point on a 
    2D cartesian coordinate plane

    :param x: x coordinate of point
    :param y: y coordinate of point
    :return:  distance of point from the origin
    """
    return math.sqrt(x**2 + y**2)