# Arup Guha
# 9/1/2020
# Calculates the slope between two points.

# Get first point
x1 = float(input("What is the x coordinate of the first point?\n"))
y1 = float(input("What is the y coordinate of the first point?\n"))

# Get second point
x2  = float(input("What is the x coordinate of the second point?\n"))
y2 = float(input("What is the y coordinate of the second point?\n"))

# Calculate slope.
slope = (y2-y1)/(x2-x1)

# Output the result.
print("The slope of your line is",slope)

# y = mx + b, so b = y - mx, we know y, m and x so we can find b.
b = y1 - slope*x1

# Print out the line equation.
print("The equation of your line is y=", slope,"x + ",b, sep="")



