THE BEST CALCULATOR ON REPL.IT *not clickbait*
Finally, this took SO MUCH effort. FINALLY IT WORKS.
I present to the repl.it community:
The best calculator I have ever seen on repl.it (so the title could potentially have been clickbait unintentionally, I have not been around for that long...). Following a trio of connected calculators:
This excels them all in all areas. The closest one is Valdez's C++ one but this is far smaller and more efficient, as well as supporting a couple more operators. Do your worst - if you do find a bug, please PLEASE let me know in the comments, I really want this flawless. It will be harder to abuse than Valdez's (I saw what you community did to that comment section) because it
will should ignore any invalid characters or valid characters in invalid positions. However, obviously, integer limit is still a problem :braces himself for upcoming abuse of calculator:. Any questions or suggestions (preferably questions) please write them in the comments.
P.S: Please work calculator PLEASE.
Overall nice calculator.
However, I have found an error in your calculator
Another graphical problem (an extra dot in the end):
It can also be improved by adding equation solvers with variables, like the online calculator https://www.symbolab.com/ of wolfram alpha.
print("calculator" == "algebra calculator") >>> False
and second, note the "that I have seen". Even excluding the second point as it is kind of cheaty, try and find me a better calculator that matches the first point on repl.it, or, even better, make one yourself. I would be quite happy to be educated on the matter...
As for finding a better calculator, I take you up on that challenge. emilian1000000's calculator (https://repl.it/@emilian1000000/Mega-Calculator) can be seen as better because of the average command as well as calculations on '<' and '>'.
finally, you got a ton of cycles@henryeth! And the code is sooooooooo complicated that....(what is the append thing over there? what are - char, and other crazy stuff?)
The answer should be negative, returns POSITIVE
The nnswer should be 0.5. Instead returns the number if the exponent were POSITIVE (this is, 0.5), returning TWO.
You shouldn´t be SO POSITIVE with your calculator, SIR HENRY.
Or, you could just like do this:
print(eval(input("Enter you expression: "))) since python can do math
One thing that could be improved on is floating-point math. It is hard for base-2 computers to do simple things like add 0.1 and 0.2, but you could try a workaround, like multiplying the float until it is an int.