Jun-14-2020, 12:41 AM
I don't really see the point in the current code you have. It looks like your goal is to take in a linear function that the user gives the program, and it will rearrange it to be graphed as x being the input and y the output. So basically solving for y in relation to x. The current code is hard coded, and doesn't do anything, to progress towards your goal I'd like to give some suggestions on how you could build the program. First you should create a part of the program to take in user input. Look into
A couple hints if you want them: Try separating my operators (+, -, /, etc.). Sorting the equation into parts such as constants and variables.
Hope this helps!
string.strip
and string.lower
as I think they'd be useful for simplifying the equation to be examined. So then the equation can be passed to the part of the program which is to rearrange the program. Think about how you yourself solve do this, and translate that into code.A couple hints if you want them: Try separating my operators (+, -, /, etc.). Sorting the equation into parts such as constants and variables.
Hope this helps!