Python Programming – John Zelle: Chapter 3 ex. 6

Two points in a plane are specified using the coordinates (x1,y1) and (x2,y2). Write a program that calculates the slope of a line through two (non-vertical) points entered by the user.

Run =
This program calculates the slope of a line through 2 points.

Input the first x and y point separated by a comma 2,3
Input the second x and y point separated by a comma 4,8
The slope is 5 / 2