Jason S. answered 01/08/21
Software engineer with a passion for helping people learn.
extremely simple solution:
x1, x2, y1, y2 = input("enter x1, x2, y1, y2 in this order: ")
m = (y2-y1)/(x2-x1)
print(m)
Moinul H.
asked 01/07/21Write a python program for
Calculate the value for the slope m of the line . The program should receive its x & y coordinates from the user. (notes: Equation for the slope of the lines is m (x2-x1) = (y2 - y1); where x1 and x2 are X coordinates and y1 and y2 are Y coordinates) (6 Points)
Expected output :
The slope of the line for given X Coordinates : x1 = 5 and x2 = 4 & Y Coordinates : y1 = 3 and y2 = 5 is -2.0
Jason S. answered 01/08/21
Software engineer with a passion for helping people learn.
extremely simple solution:
x1, x2, y1, y2 = input("enter x1, x2, y1, y2 in this order: ")
m = (y2-y1)/(x2-x1)
print(m)
Get a free answer to a quick problem.
Most questions answered within 4 hours.
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.