Your Perfect Assignment is Just a Click Away
We Write Custom Academic Papers

100% Original, Plagiarism Free, Customized to your instructions!


CSE 3302 North Lake College Python Programming Coding Task

CSE 3302 North Lake College Python Programming Coding Task

Question Description

  • Do NOT plagiarize.
  • No group work. All work should be your own.
  • Do not discuss your work with other students in the class.
  • You CANNOT borrow code from online sources.

Use Python to create a simple calculator that accepts Reverse Polish Notation (RPN) and displays the final answer (Intermediate steps or results need not be displayed).

It only accepts 4 operators “+”, “-“, “*”, “/”.

Input numbers will be single digits.

The input will be in postfix notation.

The input will be provided in a text file called input_RPN.txt.

Your program should not ask the user for any input.

There will be one RPN expression in each line.

Your code should be able to read the file and print the result for each RPN in a new line.
Example of RPN: 4 2 + and your output should be 6. This is a simple expression. More complex algebraic notations will be used to test your program like the one below.
Example algebraic notation: ( 4 + 2 * 5 ) / ( 1 + 3 * 2 )
Translated into RPN: 4 2 5 * + 1 3 2 * + /

Note: – Your code should be able to read the input file from the same folder (which has your .py file). Do not hard code the path to the file in your laptop/desktop. Use os to get the path and read the input file. Also, please take special care to process the line-ending character correctly; for example, if you write the program on a Mac it should work correctly when graded using Windows and vice versa.

Extra credit (5 points each)

  • Write a separate program that can input an algebraic expression and convert it to RPN and then evaluate the RPN. Print the RPN and the result in separate lines. If you are implementing extra credit, your file should be name as <netid> The input file name will be input_RPN_EC.txt and it will have algebraic expressions.
  • Add more operators (unary subtraction, or modulo division, etc.). You must document what operators you are adding. Add which ones to comments and make sure to include that as well in your submission so the GTA knows to test using the extra scenarios.

Order Solution Now

Our Service Charter

1. Professional & Expert Writers: DESTINY PAPERS only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of master's and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by DESTINY PAPERS are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. DESTINY PAPERS is known for the timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit in all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At  DESTINY PAPERS, we have put in place a team of experts who answer all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.