How is the string ‘answer’ storing the required result after every operation made? Instead can we not define a new string after every operation to store the result?
Yeah, we can use the different strings to store each result. But in that case, we’ll have to use a lot of variable strings at every step. So it is better to use one variable for all operations.