giulio98/xlcost-single-prompt huggingface dataset:
# area of a triangle from the given lengths of medians | python3 program to calculate area of a triangle from the given lengths of medians ; function to return the area of triangle using medians ; 

import math


def Area_of_Triangle(a, b, c):
    s = (a + b + c) // 2
    x = s * (s - a)
    x = x * (s - b)
    x = x * (s - c)
    area = (4 / 3) * math .sqrt(x)
    return area


a = 9
b = 12
c = 15
ans = Area_of_Triangle(a, b, c)
print(round(ans, 2))

# Expected output:
72.0
# find the equation of plane which passes through two points and parallel to a given axis | python3 implementation to find the equation of plane which passes through two points and parallel to a given axis ; find direction vector of points ( x1 , y1 , z1 ) and ( x2 , y2 , z2 ) ; values that are calculated and simplified from the cross product ; print the equation of plane ; 
def findEquation(x1, y1, z1, x2, y2, z2, d, e, f):
    a = x2 - x1
    b = y2 - y1
    c = z2 - z1
    A = (b * f - c * e)
    B = (a * f - c * d)
    C = (a * e - b * d)
    D = -(A * d - B * e + C * f)
    print(A, "x + ", B, "y + ", C, "z + ", D, "= 0")


if __name__ == "__main__":
    x1 = 2
    y1 = 3
    z1 = 5
    x2 = 6
    y2 = 7
    z2 = 8
    a = 11
    b = 23
    c = 10
    findEquation(x1, y1, z1, x2, y2, z2, a, b, c)

# Expected output:
-29 x +  7 y +  48 z +  0 = 0
# find the length of the median of a triangle if length of sides are given | python3 implementation to find the length of the median using sides of the triangle ; function to return the length of the median using sides of triangle . ; 

import math


def median(a, b, c):
    n = (1 / 2) * math .sqrt(2 * (b ** 2) + 2 * (c ** 2) - a ** 2)
    return n


a = 4
b = 3
c = 5
ans = median(a, b, c)
print(round(ans, 2))

# Expected output:
3.61
# number of quadrilateral formed with n distinct points on circumference of circle | function to find the number of combinations in the n ; function to find the factorial of the given number n ; loop to find the factorial of the given number ; 
def fact(n):
    res = 1
    for i in range(2, n + 1):
        res = res * i
    return res


def nCr(n, r):
    return (fact(n) / (fact(r) * fact(n - r)))


if __name__ == "__main__":
    n = 5
    print(int(nCr(n, 4)))

# Expected output:
5
# length of remaining two sides of a triangle from a given side and its adjacent angles | python3 program for above approach ; function for computing other 2 side of the trianlgle ; computing angle c ; converting a in to radian ; converting b in to radian ; converting c in to radian ; computing length of side b ; computing length of side c ; 

import math


def findSide(a, B, C):
    A = 180 - C - B
    radA = math .pi * (A / 180)
    radB = math .pi * (B / 180)
    radC = math .pi * (C / 180)
    b = a / math .sin(radA) * math .sin(radB)
    c = a / math .sin(radA) * math .sin(radC)
    return b, c


a = 12
B = 60
C = 30
b, c = findSide(a, B, C)
print(b, c)

# Expected output:
10.392304845413264 5.999999999999999
# minimum area of square holding two identical rectangles | function to find the area of the square ; larger side of rectangle ; smaller side of the rectangle ; 
def areaSquare(L, B):
    large = max(L, B)
    small = min(L, B)
    if (large >= 2 * small):
        return large * large
    else:
        return (2 * small) * (2 * small)


if __name__ == '__main__':
    L = 7
    B = 4
    print(areaSquare(L, B))

# Expected output:
64
# minimum side of square embedded in regular polygon with n sides | python 3 program to find the minimum side of the square in which a regular polygon with even sides can completely embed ; pi value in python 3 using acos function ; function to find the minimum side of the square in which a regular polygon with even sides can completely embed ; projection angle variation from axes ; projection angle variation when the number of sides are in multiple of 4 ; distance between the end points ; projection from all n points on x - axis ; projection from all n points on y - axis ; maximum side ; return the portion of side forming the square ; 

import math
pi = math .acos(-1.0)


def nGon(N):
    proAngleVar = 0
    if (N % 4 == 0):
        proAngleVar = (pi * (180.0 / N) / 180)
    else:
        proAngleVar = (pi * (180.0 / (2 * N)) / 180)
    negX = 1.0e+99
    posX = -1.0e+99
    negY = 1.0e+99
    posY = -1.0e+99
    for j in range(N):
        px = math .cos(2 * pi * j / N + proAngleVar)
        py = math .sin(2 * pi * j / N + proAngleVar)
        negX = min(negX, px)
        posX = max(posX, px)
        negY = min(negY, py)
        posY = max(posY, py)
    opt2 = max(posX - negX, posY - negY)
    return (opt2 / math .sin(pi / N) / 2)


if __name__ == "__main__":
    N = 10
    print('%.5f' % nGon(N))

# Expected output:
3.19623
# heptacontagon number | finding the nth heptacontagon number ; 
def heptacontagonNum(n):
    return (68 * n * n - 66 * n) // 2


N = 3
print("3rd heptacontagon Number is =", heptacontagonNum(N))

# Expected output:
3rd heptacontagon Number is = 207
# program to check if n is a icositetragonal number | python3 implementation to check that a number is icositetragonal number or not ; function to check that the number is a icositetragonal number ; condition to check if the number is a icositetragonal number ; 

import math


def isicositetragonal(N):
    n = (10 + math .sqrt(44 * N + 100)) / 22
    return (n - int(n)) == 0


i = 24
if (isicositetragonal(i)):
    print("Yes")
else:
    print("No")

# Expected output:
Yes
# program to check if n is a tridecagonal number or not | python3 implementation to check that a number is a tridecagon number or not ; function to check that the number is a tridecagon number ; condition to check if the number is a tridecagon number ; 

import math


def isTridecagon(N):
    n = (9 + math .sqrt(88 * N + 81)) / 22
    return (n - int(n)) == 0


i = 13
if (isTridecagon(i)):
    print("Yes")
else:
    print("No")

# Expected output:
Yes
# program to check if n is a icosihenagonal number | python3 implementation to check that a number is icosihenagonal number or not ; function to check that the number is a icosihenagonal number ; condition to check if the number is a icosihenagonal number ; 

import math


def isicosihenagonal(N):
    n = (17 + math .sqrt(152 * N + 289)) / 38
    return (n - int(n)) == 0


i = 21
if isicosihenagonal(i):
    print("Yes")
else:
    print("No")

# Expected output:
Yes
# program to check if n is a icositrigonal number | python3 implementation to check that a number is a icositrigonal number or not ; function to check that the number is a icositrigonal number ; condition to check if the number is a icositrigonal number ; 

import math


def isicositrigonal(N):
    n = (19 + math .sqrt(168 * N + 361)) / 42
    return (n - int(n)) == 0


i = 23
if (isicositrigonal(i)):
    print("Yes")
else:
    print("No")

# Expected output:
Yes
# check whether triangle is valid or not if three points are given | function to check if three points make a triangle ; calculation the area of triangle . we have skipped multiplication with 0.5 to avoid floating point computations ; condition to check if area is not equal to 0 ; 
def checkTriangle(x1, y1, x2, y2, x3, y3):
    a = (x1 * (y2 - y3) + x2 * (y3 - y1) + x3 * (y1 - y2))
    if a == 0:
        print('No')
    else:
        print('Yes')


if __name__ == '__main__':
    (x1, x2, x3) = (1, 2, 3)
    (y1, y2, y3) = (1, 2, 3)
    checkTriangle(x1, y1, x2, y2, x3, y3)

# Expected output:
No
# total number of triplets ( a , b , c ) in which the points b and c are equidistant to a | function to count such triplets ; iterate over all the points ; iterate over all points other than the current point ; compute squared euclidean distance for the current point ; compute np2 that is n * ( n - 1 ) ; return the final result ; 
def numTrip(points):
    res = 0
    for i in range(len(points)):
        map = {}
        for j in range(len(points)):
            if (j == i):
                continue
            dy = points[i][1] - points[j][1]
            dx = points[i][0] - points[j][0]
            key = dy * dy
            key += dx * dx
            map[key] = map .get(key, 0) + 1
        for p in map:
            res += map[p] * (map[p] - 1)
    return res


if __name__ == '__main__':
    mat = [[0, 0], [1, 0], [2, 0]]
    print(numTrip(mat))

# Expected output:
2
# check if any point overlaps the given circle and rectangle | function to check if any point overlaps the given circle and rectangle ; find the nearest point on the rectangle to the center of the circle ; find the distance between the nearest point and the center of the circle distance between 2 points , ( x1 , y1 ) & ( x2 , y2 ) in 2d euclidean space is ( ( x1 - x2 ) * * 2 + ( y1 - y2 ) * * 2 ) * * 0.5 ; 
def checkOverlap(R, Xc, Yc, X1, Y1, X2, Y2):
    Xn = max(X1, min(Xc, X2))
    Yn = max(Y1, min(Yc, Y2))
    Dx = Xn - Xc
    Dy = Yn - Yc
    return (Dx ** 2 + Dy ** 2) <= R ** 2


if (__name__ == "__main__"):
    R = 1
    Xc, Yc = 0, 0
    X1, Y1 = 1, -1
    X2, Y2 = 3, 1
    print(checkOverlap(R, Xc, Yc, X1, Y1, X2, Y2))

# Expected output:
True
# check if the tower of sight issue occurs or not | function to check if point p lies in between the line joining p1 and p2 ; if parallel to x - axis ; point p lies between p1 and p2 ; if parallel to y - axis ; point p lies between p1 and p2 ; if point p satisfies the equation of line joining p1 and p2 ; function to check if tower of sight issue occurred ; b lies between ac ; d lies between ac ; a lies between bd ; c lies between bd ; 
def checkIntersection(p1, p2, p):
    if (p1[1] == p2[1] and p1[1] == p[1]):
        if (p[0] <= max(p1[0], p2[0]) and (p[0] >= min(p1[0], p2[0]))):
            return 1
    if (p1[0] == p2[0] and p1[0] == p[0]):
        if (p[1] <= max(p1[1], p2[1]) and (p[1] >= min(p1[1], p2[1]))):
            return 1
    else:
        val = ((p[1] - p1[1]) * (p2[0] - p1[0]) -
               (p[0] - p1[0]) * (p2[1] - p1[1]))
        if (val == 0):
            if ((p[0] <= max(p1[0], p2[0]) and (p[0] >= min(p1[0], p2[0]))) and (
                    p[1] <= max(p1[1], p2[1]) and (p[1] >= min(p1[1], p2[1])))):
                return 1
    return 0


def towerOfSight(a, b, c, d):
    flag = 0
    if (checkIntersection(a, c, b)):
        flag = 1
    elif (checkIntersection(a, c, d)):
        flag = 1
    elif (checkIntersection(b, d, a)):
        flag = 1
    elif (checkIntersection(b, d, c)):
        flag = 1
    if (flag):
        print("Yes")
    else:
        print("No")


if __name__ == "__main__":
    a = [0, 0]
    b = [0, -2]
    c = [2, 0]
    d = [0, 2]
    towerOfSight(a, b, c, d)

# Expected output:
Yes
# number of lines from given n points not parallel to x or y axis | function to find the number of lines which are formed from given n points and not parallel to x or y axis ; this will store the number of points has same x or y coordinates using the map as the value of coordinate can be very large ; counting frequency of each x and y coordinates ; total number of pairs can be formed ; we can not choose pairs from these as they have same x coordinatethus they will result line segment parallel to y axis ; we can not choose pairs from these as they have same y coordinate thus they will result line segment parallel to x - axis ; return the required answer ; 
def NotParallel(p, n):
    x_axis = {}
    y_axis = {}
    for i in range(n):
        if p[i][0]not in x_axis:
            x_axis[p[i][0]] = 0
        x_axis[p[i][0]] += 1
        if p[i][1]not in y_axis:
            y_axis[p[i][1]] = 0
        y_axis[p[i][1]] += 1
    total = (n * (n - 1)) // 2
    for i in x_axis:
        c = x_axis[i]
        total -= (c * (c - 1)) // 2
    for i in y_axis:
        c = y_axis[i]
        total -= (c * (c - 1)) // 2
    return total


if __name__ == "__main__":
    p = [[1, 2], [1, 5], [1, 15], [2, 10]]
    n = len(p)
    print(NotParallel(p, n))

# Expected output:
3
# check whether two convex regular polygon have same center or not | function to check whether two convex polygons have the same center or not ; 
def check(n, m):
    if (m % n == 0):
        print("YES")
    else:
        print("NO")


n = 5
m = 10
check(n, m)

# Expected output:
YES
# modulus of a complex number | python 3 program to find the modulus of a complex number ; function to find modulus of a complex number ; storing the index of '+ ; storing the index of '- ; finding the real part of the complex number ; finding the imaginary part of the complex number ; 

from math import sqrt


def findModulo(s):
    l = len(s)
    modulus = 0
    if ('+' in s):
        i = s.index('+')
    else:
        i = s.index('-')
    real = s[0:i]
    imaginary = s[i + 1:l - 1]

    x = int(real)
    y = int(imaginary)

    print(int(sqrt(x * x + y * y)))


if __name__ == '__main__':
    s = "3+4i"

    findModulo(s)

# Expected output:
5
# minimum number of blocks required to form hollow rectangular prism | function to display output ; function to return minimum no of layers required to form the hollow prism ; function to calculate no of blocks required for each layer ; no of blocks required for each row ; check for no of layers is minimum ; 
def disp(row_no, block):
    print(row_no * block)


def row(ht, h):
    return ht // h


def calculate(l, w, h, a, ht):
    no_block = (4 * a) // l
    if (h < w):
        row_no = row(ht, w)
    else:
        row_no = row(ht, h)
    disp(row_no, no_block)


if __name__ == '__main__':
    l = 50
    w = 20
    h = 35
    a = 700
    ht = 140
    calculate(l, w, h, a, ht)

# Expected output:
224
# maximum area of rectangle inscribed in an equilateral triangle | function to find the maximum area of the rectangle inscribed in an equilateral triangle of side s ; maximum area of the rectangle inscribed in an equilateral triangle of side s ; 
def solve(s):
    area = (1.732 * s ** 2) / 8
    return area


if __name__ == '__main__':
    n = 14
    print(solve(n))

# Expected output:
42.434
# area of largest semicircle that can be drawn inside a square | python3 program to find area of semicircle in a square ; function to find area of semicircle ; 

from math import sqrt


def find_Area(a):
    R = a * (2.0 - sqrt(2))
    area = 3.14 * R * R / 2.0
    return area


if __name__ == "__main__":
    a = 4
    print("Area of semicircle =", find_Area(a))

# Expected output:
Area of semicircle = 8.619821252751407
# count the number of times graph crosses x | function to to count the number of times the graph crosses the x - axis . ; iterate over the steps array ; update the previous level and current level by value given in the steps array ; condition to check that the graph crosses the origin . ; 
def times(steps, n):
    current_level = 0
    previous_level = 0
    count = 0
    for i in range(n):
        previous_level = current_level
        current_level = current_level + steps[i]
        if ((previous_level < 0 and current_level >= 0) or (
                previous_level > 0 and current_level <= 0)):
            count += 1
    return count


steps = [1, -1, 0, 0, 1, 1, -3, 2]
n = len(steps)
print(times(steps, n))

# Expected output:
3
# program to find x , y and z intercepts of a plane | python program to find the x , y and z intercepts of a plane ; for finding the x - intercept put y = 0 and z = 0 ; for finding the y - intercept put x = 0 and z = 0 ; for finding the z - intercept put x = 0 and y = 0 ; for finding value of a , b , c , d ; calling the first created function ; 
def XandYandZintercept(A, B, C, D):
    x = -D / A
    y = -D / B
    z = -D / C
    return [x, y, z]


def equation_plane(p, q, r):
    x1 = p[0]
    y1 = p[1]
    z1 = p[2]
    x2 = q[0]
    y2 = q[1]
    z2 = q[2]
    x3 = r[0]
    y3 = r[1]
    z3 = r[2]
    a1 = x2 - x1
    b1 = y2 - y1
    c1 = z2 - z1
    a2 = x3 - x1
    b2 = y3 - y1
    c2 = z3 - z1
    A = b1 * c2 - b2 * c1
    B = a2 * c1 - a1 * c2
    C = a1 * b2 - b1 * a2
    D = (-A * x1 - B * y1 - C * z1)
    print(XandYandZintercept(A, B, C, D))


x1 = -1
y1 = 2
z1 = 1
x2 = 0
y2 = -3
z2 = 2
x3 = 1
y3 = 1
z3 = -4
equation_plane((x1, y1, z1), (x2, y2, z2), (x3, y3, z3))

# Expected output:
[-0.11538461538461539, -0.42857142857142855, -0.3333333333333333]
# Percentage change in Hemisphere volume if radius is changed | Function to find the change in hemispheric volume ; Get the change in radius ; Calculate the change in hemispheric volume
def new_vol(x):
    if (x > 0):
        print("% change in the volume of the hemisphere: ", pow(
            x, 3) / 10000 + 3 * x + (3 * pow(x, 2)) / 100, "% increase")
    elif (x < 0):
        print("% change in the volume of the hemisphere: ", pow(
            x, 3) / 10000 + 3 * x + (3 * pow(x, 2)) / 100, "% decrease")
    else:
        print("Volume remains the same.")


x = -10.0
new_vol(x)

# Expected output:
% change in the volume of the hemisphere:  -27.1 % decrease
# find the integer points ( x , y ) with manhattan distance atleast n | function to find all possible point ; find all 4 corners of the square whose side length is n ; if n is even then the middle point of the square will be an integer , so we will take that point ; 
def FindPoints(n):
    v = []
    v .append([0, 0])
    v .append([0, n])
    v .append([n, 0])
    v .append([n, n])
    if (n % 2 == 0):
        v .append([n // 2, n // 2])
    return v


if __name__ == "__main__":
    N = 8
    v = FindPoints(N)
    for element in v:
        print("(", element[0], ",", element[1], ")", end=" ")

# Expected output:
( 0 , 0 ) ( 0 , 8 ) ( 8 , 0 ) ( 8 , 8 ) ( 4 , 4 )
# find if the glass will be empty or not when the rate of drinking is given | python3 implementation of the approach ; function to return the time when the glass will be empty ; check the condition when the glass will never be empty ; find the time ; 

pie = 3.1415926535897


def findsolution(d, h, m, n):
    k = (4 * m) / (pie * d * d)
    if (n > k):
        return -1
    ans = (h / (k - n))
    return round(ans, 5)


d = 1
h = 1
m = 1
n = 1
print(findsolution(d, h, m, n))

# Expected output:
3.65979
# sum of internal angles of a polygon | function to return the sum of internal angles of an n - sided polygon ; 
def sumOfInternalAngles(n):
    if (n < 3):
        return 0
    return ((n - 2) * 180)


n = 5
print(sumOfInternalAngles(n))

# Expected output:
540
# number of ways n can be divided into four parts to construct a rectangle | function to return the required number of ways ; 
def cntWays(n):
    if n % 2 == 1:
        return 0
    else:
        return (n - 2) // 4


n = 18
print(cntWays(n))

# Expected output:
4
# forming triangles using points on a square | function to return the count of possible triangles ; 
def noOfTriangles(n):
    y = 4 * n
    return ((y * (y - 2) * (y - 1)) - (4 * n * (n - 2) * (n - 1))) // 6


n = 1
print(noOfTriangles(n))

# Expected output:
4
# angle subtended by an arc at the centre of a circle | function to find angle subtended by an arc at the centre of a circle ; 
def angle(n):
    return 2 * n


n = 30
print(angle(n))

# Expected output:
60
# check if two given circles are orthogonal or not | function to check if the given circles are orthogonal ; calculating the square of the distance between c1 and c2 ; check if the given circles are orthogonal ; 
def orthogonality(x1, y1, x2, y2, r1, r2):
    dsquare = (x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)
    if (dsquare == r1 * r1 + r2 * r2):
        return True
    else:
        return False


x1, y1 = 4, 3
x2, y2 = 0, 1
r1, r2 = 2, 4
f = orthogonality(x1, y1, x2, y2, r1, r2)
if (f):
    print("Given circles are orthogonal.")
else:
    print("Given circles are not orthogonal.")

# Expected output:
Given circles are orthogonal.
# check if a right | storing all the possible changes to make the triangle right - angled ; function to check if the triangle is right - angled or not ; function to check if the triangle can be transformed to right - angled ; boolean variable to return true or false ; if it is already right - angled ; applying the changes on the co - ordinates ; applying on the first co - ordinate ; applying on the second co - ordinate ; applying on the third co - ordinate ; if can 't be transformed ; 

dx = [-1, 0, 1, 0]
dy = [0, 1, 0, -1]


def ifRight(x1, y1, x2, y2, x3, y3):
    a = ((x1 - x2) * (x1 - x2)) + ((y1 - y2) * (y1 - y2))
    b = ((x1 - x3) * (x1 - x3)) + ((y1 - y3) * (y1 - y3))
    c = ((x2 - x3) * (x2 - x3)) + ((y2 - y3) * (y2 - y3))
    if ((a == (b + c) and a != 0 and b != 0 and c != 0) or (b == (a + c) and a !=
                                                            0 and b != 0 and c != 0) or (c == (a + b) and a != 0 and b != 0 and c != 0)):
        return 1


def isValidCombination(x1, y1, x2, y2, x3, y3):
    x, y = 0, 0
    possible = 0
    if (ifRight(x1, y1, x2, y2, x3, y3)):
        print("ALREADY RIGHT ANGLED")
        return
    else:
        for i in range(4):
            x = dx[i] + x1
            y = dy[i] + y1
            if (ifRight(x, y, x2, y2, x3, y3)):
                print("POSSIBLE")
                return
            x = dx[i] + x2
            y = dy[i] + y2
            if (ifRight(x1, y1, x, y, x3, y3)):
                print("POSSIBLE")
                return
            x = dx[i] + x3
            y = dy[i] + y3
            if (ifRight(x1, y1, x2, y2, x, y)):
                print("POSSIBLE")
                return
    if (possible == 0):
        print("NOT POSSIBLE")


x1 = -49
y1 = 0
x2 = 0
y2 = 50
x3 = 0
y3 = -50
isValidCombination(x1, y1, x2, y2, x3, y3)

# Expected output:
POSSIBLE
# program to find area of triangle inscribed in n | python3 program to find the area of a triangle inscribed in n - sided regular polygon ; function to find the area of the polygon ; area of a regular polygon with n sides and side length len ; function to find the area of a triangle ; area of one triangle in an n - sided regular polygon ; area of inscribed triangle ; 

import math


def area_of_regular_polygon(n, len):
    P = (len * n)
    A = len / (2 * math .tan((180 / n) * 3.14159 / 180))
    area = (P * A) / 2
    return area


def area_of_triangle_inscribed(n, len):
    area = area_of_regular_polygon(n, len)
    triangle = area / n
    ins_tri = (triangle * 3)
    return ins_tri


n = 6
len = 10
print(round(area_of_triangle_inscribed(n, len), 3))

# Expected output:
129.904
# find the area of quadrilateral when diagonal and the perpendiculars to it from opposite vertices are given | function to find the area of quadrilateral ; 
def Area(d, h1, h2):
    area = 0.5 * d * (h1 + h2)
    return area


if __name__ == '__main__':
    d = 6
    h1 = 4
    h2 = 3
    print("Area of Quadrilateral = ", (Area(d, h1, h2)))

# Expected output:
Area of Quadrilateral =  21.0
# find the diagonal of the cube | python3 program to find length of the diagonal of the cube ; function to find length of diagonal of cube ; formula to find length of diagonal of cube ; 

from math import sqrt


def diagonal_length(a):
    L = 0
    L = a * sqrt(3)
    return L


a = 5
print(diagonal_length(a))

# Expected output:
8.660254037844386
# concentric hexagonal numbers | function to find nth concentric hexagon number ; 
def concentric_Hexagon(n):
    return 3 * pow(n, 2) // 2


n = 3
print(concentric_Hexagon(n))

# Expected output:
13
# find area of the larger circle when radius of the smaller circle and difference in the area is given | python 3 implementation of the approach ; function to return the area of the bigger circle ; find the radius of the bigger circle ; calculate the area of the bigger circle ; 

from math import pow, sqrt
PI = 3.14


def find_area(r, d):
    R = d / PI
    R += pow(r, 2)
    R = sqrt(R)
    area = PI * pow(R, 2)
    return area


if __name__ == '__main__':
    r = 4
    d = 5
    print(find_area(r, d))

# Expected output:
55.24
# check whether quadrilateral is valid or not if angles are given | function to check if a given quadrilateral is valid or not ; check condition ; 
def Valid(a, b, c, d):
    if (a + b + c + d == 360):
        return True
    return False


a = 80
b = 70
c = 100
d = 110
if (Valid(a, b, c, d)):
    print("Valid quadrilateral")
else:
    print("Invalid quadrilateral")

# Expected output:
Valid quadrilateral