0
Why won't this work?
I have tested this code in an IDE and it works but it won't on the SoloLearn IDE, it is a calculator. equation = input() print(equation) legal_chars = set("0123456789-+*/()")
6 Answers
+ 2
the code you provided doesn't seem finished
+ 1
Jackson C cause the code in this post doesn't actually calculate anything, just prints the input
+ 1
Jackson C i don't see how that would calculate anything, there's no math in the code whatsoever, did you mean "print(eval(equation))"?
0
why is that
0
i know that is why i posted this because when i ran it on my desktop it gave me the answer but on here it just wrote the equatipn again
0
hinanawi i just now realized i wrote the program in python 2.7 and sololearn uses 3 sorry for wasting you time