Skip to content

Instantly share code, notes, and snippets.

@d0mmie
Created January 8, 2021 14:25
Show Gist options
  • Save d0mmie/fd9fde3d756bb3f87d30d0229c250f42 to your computer and use it in GitHub Desktop.
Save d0mmie/fd9fde3d756bb3f87d30d0229c250f42 to your computer and use it in GitHub Desktop.
print("First Equation")
m1 = int(input("Input m1: "))
b1 = int(input("Input b1: "))
print("Second Equation")
m2 = int(input("Input m2: "))
b2 = int(input("Input b2: "))
crossX = (b1 - b2)/(m2 - m1)
print("The point of intersection is at x = %.2f and y = %.2f" % (crossX, (crossX * m1 + b1)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment