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.
Thank you all so much this is by far the most cycles I have ever had!
Overall nice calculator.
However, I have found an error in your calculator @henryeth - it cannot handle imaginary numbers (3 + 2i^2 etc.). However, imaginary numbers are a key area in algebra, so this can be called a major error.
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.
@KnightsOfAzgard I said it was the best calculator on repl.it that I have seen. First, notice the lack of the word "algebra"
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...
@henryeth 'Calculator' may not equal 'Algebra Calculator', but 'Algebra calculator' is a 'calculator' so I suggest you make that clear.
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