Write a python program that reads a dumbbasic program

Assignment Help Python Programming
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 "proof­of­concept­prototype", 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 production­quality 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 one­by­one 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

Reference no: EM131004113

Questions Cloud

How us attorneys roles may influence judicial policymaking : Explain in a paragraph the doctrine of stare decisis as distinguished from civil-law systems. Review how U.S attorneys roles may influence judicial policymaking
Selected financial data for squid company : Selected financial data for Squid Company are as follows:
Identify the optimal level of water quality : In the diagram draw the marginal social cost line that illustrates this. Add a marginal social benefit line that shows how the additional benefits of control decrease. Identify the optimal level of water quality. Suppose the government mandates co..
Find the equation to the graph : Let f (x) = 2x3/ (3 - 3x)3. Find the equation of line tangent to the graph of f at x = 2. Let f (x) = 6x√(4 - 2x). Find the equation to the graph of f at x = -2.
Write a python program that reads a dumbbasic program : 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.
Are businesses taking steps to internalize externalities : The Marketplace section of the Wall Street Journal is a good place to look for information re- lated to externalities. On a given day, see how many sto- ries you can find that deal with externalities-positive or negative. Are businesses taking ste..
Postretirement commitments retirement restoration plan : The Retirement Restoration Plan provides death benefits and supplemental income payments for senior executives after retirement. The Company recognized expense of $5.2 million in 2006, $6.4 million in 2005 and $7.1 million in 2004.
When is a profitability index used : How can we compare projects in the case where they have different life-spans?
Consolidated statement of earnings of anonymous corporation : The consolidated statement of earnings of Anonymous Corporation for the year ended December 31, 2007, is as follows:

Reviews

Write a Review

 

Python Programming Questions & Answers

  Function should return a dictionary

Write a function numOccur(s), where s is a string; the function should return a dictionary whose keys are the 26 ascii letters abcdefghijklmnopqrstuvwxyz

  The block of statements below the line of stars

The block of statements below the line of stars is where I need help correcting. The true line that needs to be corrected is p = add((getX(k),getY(r))), it needs to give points of the path using the block of information. I have somthing which I kn..

  Prepare a python program

Prepare a Python program which evaluates how many stuck numbers there are in a range of integers. The range will be input as two command-line arguments.

  1 why is biodiversity importantnbsp discuss the ways in

1 why is biodiversity important?nbsp discuss the ways in which the value may be assigned to biodiversity. based on your

  Create mini-python projects or programs

Your assignment is to create mini-Python projects or programs and to run them in the Python-IDLE environment

  The dictionary order based on the ascii order

Needless to say, the dictionary order based on the ASCII order is not what a real-world indexing software wants. So, we want to implement the dictionary order of strings in the standard wa

  Data file is a comma separated

The data file is a comma separated text values stored in a file with '.CSV' extension. The file has five columns corresponding to employee data fields listed above.

  Write python code that will execute a list

Write python code that will execute a list of functions with supplied parameters and report the observed runtime for each function run. Assume that the input file has a list of strings like so:

  Find in the dataset how often u2 is mentioned as artist

Write and run Hadoop code (mappers and reducers) to find in the Last.fm dataset (a) how often U2 is mentioned as artist and (b) songs that have been played more than 600 million times.

  Let ll be a list of integers

Let LL be a list of integers. Use list comprehension to produce teh following lists. Each one should just take onel line. Anser questions as two comments.

  Arithmetic progression is a sequence of numbers

An arithmetic progression is a sequence of numbers in which the distance (or difference) between any two successive numbers if the same.

  Write a function that will take two arguments

Write a function that will take two arguments: a word to be searched for and a list of strings containing the grid and write code to read, in turn, each line of the file, remove the newline character and append the resulting string to a list of stri..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd