Closed Abdur-rahmaanJ closed 5 years ago
well if i give you
2+3-5*7
can you write a python program to evaluate it? if you can, i'll guide you where to insert it!
Yes! I can do this . I will first convert the infix expression to postfix ,then evaluate the postfix expression to calculate the answer. This can be done with the help of Stacks. Please provide me the workplace i.e. where to code it out. One more question,Is it mandatory to implement it in python ,can i do in C++ ? If it is mandatory , I have no issues,ignore the above lines then.
Regards Kushal Vijay
in python. when you code it, i'll tell you where to put 👌
Yes,I have written the code and its running properly . Now please guide me where to put it,then i will send you a pull request.
But postfix to infix evaluation is only valid for expression having digits between 0 to 9. For higher numbers the original expression should have separator like space between all elements (operators and operands) of given expression.
nooo solve this as that's what is meant by evaluating 1+2-5*8/4
Yes Sir, my code can solve this expression easily .Let me pull a request ,then you can review it if there is any issue then let me know . Is it ok?
ok fine, you can put a utils file and then put it in a function
Sorry ,for the late response.Please review the pull request . For the example above you have given me ,there is an ambiguity ,for correct answer, the expression should be like 1+2-(5*8)/4=-7 Thankyou
gave just a basic, mine is btw =- or =+ etc not part of eval
near closing issue
I have gone through the documentation and Since i am a beginner, i did not understood in which file i have to make changes i.e. write code for " postfix evaluation". Please help