Question: Python. Take an arithmetic expression in infix notation, I. a. Write a function In_Post(I) to covert I to it's postfix notation(reverse-polish notation), P. b. Then

Python. Take an arithmetic expression in infix notation, I.

a. Write a function In_Post(I) to covert I to it's postfix notation(reverse-polish notation), P.

b. Then write another function to evaluate the value of P and print the result.

Example:

a. Input: 9-(8/2^2+1)*3

Output : 9822^/1+3*-

b. Input: 9822^/1+3*-

Output: 0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!