I forgot to put the text to speech part, but this remix show how you can shorten your code and make it better, although it still doesn't use PEMDAS
Im sorry if this didn't help