← Concepts
Linear Equations
y = m·x + b.
A line has slope m (rise over run) and y-intercept b. Two points define a line; the slope is (y2-y1)/(x2-x1).
Worked example
def y(x):
return 2*x + 1
print(y(3)) # 7Related challenges