```def diff(a,b):

# end function

print(" *** Find difference between A(x1,y1) and B(x2,y2) ***")
ins = input("Enter x1 y1 x2 y2 : ").split()
pointA= (int(ins[0]),int(ins[1]))
pointB= (int(ins[2]),int(ins[3]))
print("A B ==>",pointA,pointB)
print("Differnce from", pointA,"to", pointB,"==>",diff(pointA,pointB))
print("Differnce from", pointB,"to", pointA,"==>",diff(pointB,pointA))```
`output`
``` *** Find difference between A(x1,y1) and B(x2,y2) ***
Enter x1 y1 x2 y2 : 1 2 3 4
A B ==> (1, 2) (3, 4)
Differnce from (1, 2) to (3, 4) ==> (2, 2)
Differnce from (3, 4) to (1, 2) ==> (-2, -2)```
Nov 22, 2021 in Python 259 views

## What does the random.triangular(low, high, mode) function do in python?

It returns a random floating point number ...READ MORE

## What to do when len() does not return the number of integers in range(1,100)?

You can use the following code block: x=range(1,100) len(x) Output: ...READ MORE

## What does the dir() function do in python?

The dir() function returns all properties and methods of ...READ MORE

+1 vote

## How do I use Django templates without the rest of Django?

Hello @kartik, Let's say you have this important ...READ MORE

## Why do we not follow the "off by one" rule in python

It's because of the way in which ...READ MORE

## how can i randomly select items from a list?

You can also use the random library's ...READ MORE

+1 vote

## how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE