Created
December 3, 2020 23:25
-
-
Save snailmusic/d71f1c6c89e356e5bb0457b043ce48c0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
x = [0,0] | |
y = [0,0] | |
x[0] = int(input("x1: ")) | |
y[0] = int(input("y1: ")) | |
x[1] = int(input("x2: ")) | |
y[1] = int(input("y2: ")) | |
slope = [y[1]-y[0],x[1]-x[0]] | |
slopestr = f"{slope[0]}/{slope[1]}" | |
print(f"slope : {slopestr}") | |
print(f"point-slope form : y - {y[0]} = {slopestr}(y - {x[0]})") | |
psx = (x[0] * (slope[0]/slope[1])) + y[0] | |
print(f"y = {slopestr}x + {psx}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
point slope was annoying