Question #314143

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.


Expert's answer

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}")

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS