Im trying to build an app that graphs an equation based on user input. The equation would be in slope intercept form: y = mx + b
, for m
as slope and b
as y intercept
. However, this isn't working for me in python!
I tried this:
>>> x = 3
>>> 1/2x
and was returned this:
File "<stdin>", line 1
1/2x
^
SyntaxError: invalid syntax
>>>
How would I make it so that this returns 1.5?