Nov-20-2021, 07:22 AM
You probably want this to create the points:
def createPoints(): x1 = int(input ('Enter a value x of point a ')) y1 = int(input ('Enter a value y of point a ')) x2 = int(input ('Enter a value x of point b ')) y2 = int(input ('Enter a value y of point b ')) return [[x1, y1], [x2, y2]]To add the points:
def additionAB (points): c = points[0][0] + points[1][0], points[0][1] + points[1][1] return cThe call them
print(additionAB(createPoints()))