0

I get a SyntaxError: can't assign to operator error in a max() min() function. What did I do wrong?

https://code.sololearn.com/clM2qZYBd3hG this is the error: File "/home/pi/Desktop/PythonStuff/MyProjects/aoth.py", line 25 max(aofx, bofx) - min(aofx, bofx) = result_abx ^ SyntaxError: can't assign to operator

28th Jun 2020, 6:12 PM
Elias Kamakas
Elias Kamakas - avatar
2 Antworten
+ 6
You have to write that line the other way around - result_abx = max(aofx, bofx) - min(aofx, bofx) Always put the variable you are setting on the left.
28th Jun 2020, 6:16 PM
Russ
Russ - avatar
0
Also Id like to explain what this code does but it has to do with economics and its very complicated so sorry. If you have any questions ask.
28th Jun 2020, 6:13 PM
Elias Kamakas
Elias Kamakas - avatar