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

  Write a python program to implement the diff command

Without using the system() function to call any bash commands, write a python program that will implement a simple version of the diff command.

  Write a program for checking a circle

Write a program for checking a circle program must either print "is a circle: YES" or "is a circle: NO", appropriately.

  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.

  Python atm program to enter account number

Write a simple Python ATM program. Ask user to enter their account number, and print their initail balance. (Just make one up). Ask them if they wish to make deposit or withdrawal.

  Python function to calculate two roots

Write a Python function main() to calculate two roots. You must input a,b and c from keyboard, and then print two roots. Suppose the discriminant D= b2-4ac is positive.

  Design program that asks user to enter amount in python

IN Python Design a program that asks the user to enter the amount that he or she has budget in a month. A loop should then prompt the user to enter his or her expenses for the month.

  Write python program which imports three dictionaries

Write a Python program called hours.py which imports three dictionaries, and uses the data in them to calculate how many hours each person has spent in the lab.

  Write python program to create factors of numbers

Write down a python program which takes two numbers and creates the factors of both numbers and displays the greatest common factor.

  Email spam filter

Analyze the emails and predict whether the mail is a spam or not a spam - Create a training file and copy the text of several mails and spams in to it And create a test set identical to the training set but with different examples.

  Improve the readability and structural design of the code

Improve the readability and structural design of the code by improving the function names, variables, and loops, as well as whitespace. Move functions close to related functions or blocks of code related to your organised code.

  Create a simple and responsive gui

Please use primarily PHP or Python to solve the exercise and create a simple and responsive GUI, using HTML, CSS and JavaScript.Do not use a database.

  The program is to print the time

The program is to print the time in seconds that the iterative version takes, the time in seconds that the recursive version takes, and the difference between the times.

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