Given the slope-intercept form equation, y = mx+b. Write a program that asks the user to enter values for the respective variables (m, x, and b). Use those variables to calculate the results of the equation. Then print out the values for m, x, b, and y.
m = int(input("Input m: "))
x = int(input("Input x: "))
b = int(input("Input b: "))
y = m * x + b
print(f"\ny = {m} * {x} + {b} = {y}")
Comments
Leave a comment