def normalize_angle(deg):
    """
    Take an angle in degrees and return it as a value between 0 and 360
    :param deg: float or int
    :return: float or int, value between 0 and 360
    """
    angle = deg
    while angle > 360:
        angle -= 360

    while angle < 360:
        angle += 360

    return angle