Contact Us!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

| Download
Views: 27
Image: ubuntu2004
Kernel: Python 3 (system-wide)

Since we need to find x-intercept from y=mx+b, we will use x:=(y-b)/m. Also, we need to define it as function

def x_int(m,b): print((f"x=(y-{b})/{m}"))

We input the variables m and b into the function

Example 1:

x_int(7,8)
x=(y-8)/7

Example 2:

x_int(3,6)
x=(y-6)/3

Example 3:

x_int(-3,1)
x=(y-1)/-3