Write a python program to compute the slope of a line between two points (x1,y1) and (x2,y2).
print("Enter Following Details")
x1 = float(input("Enter X1 :"))
y1 = float(input("Enter y1 :"))
x2 = float(input("Enter X2 :"))
y2 = float(input("Enter y2 :"))
slope = (y2-y1) / (x2-x1)
print(slope)
Comments
Post a Comment