Reference no: EM131004113
Complete assignment in python 2.7
Your task
You should write a Python program that reads a DUMBBASIC program from standard input1, and prints the results of executing that program to standard output.
Your code is intended as a "proofofconceptprototype", so your code does not have to be robust against invalid input. However, it should be properly commented so as to serve as a reference for when you implement a productionquality version.
Reuse
In the course of your assignments throughout the semester, you will implement an interpreter for a related language. While you may not directly reuse this code, you should design your prototype in such a way that it would be easy to extend.
Incremental development
You should develop your program incrementally, getting a intermediate parts working and tested before going on to the next. You should implement the PRINT statement first. You will be given partial marks for each of the commands you do successfully implement.
Efficiency
Correctness and a clean design are more important than fast performance for this assignment; however, you should choose your data structures and algorithms to avoid obvious bottlenecks (for instance, searching through a list onebyone repeatedly rather than using a dictionary).
Submitting
If your code is in a single Python source file, you need only submit that (appropriately commented) file. Please call this file dumbbasic.py. Header comments should include your name, a brief description of what has been implemented, and any known bugs.
If your code is in multiple source files, you should submit a ZIP file containing those not a rar, gzipped tar, or any other archiving format. The file that I should run to interpret a DUMBBASIC program should be called dumbbasic.py
Attachment:- Assignment.rar