
Please help Using python Interpreter In this exercise you will create a tiny interpreter for simple arithmetic operations. Your
comends.txt
add 11 22
DIVIDE 99 11
Multiply 22 10001
power 11 22
sub 2 101
divide 7 0
Power 2 10
ADD 123 45.67
multiply -3 -7
bad 1 2
power 10 -2
Fail
sub 1001 1700
Contents of Commands.txt
add 11 22
DIVIDE 99 11
Multiply 22 10001 ...
Contents of Output.xt
Interpreter Runtime Output 1 :
add(11,22) = 33 2 :
divide(99,11) = 9.0 3 :
multiply(22,10001) = 220,022
Sample Output:
Name of input file: no such file
Name of output file: output.txt
input file: no such file.txt
output file: output.txt
operation failed: No such file or directory
Name of input file: commands
Name of output file: output
Input file: commands.txt
output file: output.txt

Trending nowThis is a popular solution!
Step by stepSolved in 3 steps with 4 images

- PLEASE ANSWER FOR PYTHON COLABarrow_forwardPlease use Replit to complete in C programming language. PLEASE FOLLOW guidelines CLOSELY AND SHOW OUTPUTSarrow_forwardThe instruction of the program is in the attached photo. Kindly use python. **This is the separate file code. from Shape import Shape# input tester for fa07# do not edit any part of this file! inp = input().split() # space separated inputsinputs=()for x in inp:# convert each input to float, save each input into tupleinputs = inputs + (float(x),) # initializes inputs as separate valuess = Shape(*inputs)# prints shape areas.printArea()arrow_forward
- In Python, Create a program that will write 100 integers created randomly in a file. The integers will be separated by a space in the file. Read the data back from the file, and display the sorted data. The program should prompt the user to enter a file name. Utilize the following function headers for this problem: Main() WriteNumbers(filename) ReadNumbers(filename) The main function will first prompt the user to enter the filename. Then the main function calls WriteNumbers-then ReadNumbers. The WriteNumbers function opens an output file and writes 100 random numbers as long a large string text. Do not use lists for this problem- please just write a random number followed by a space 100 times. The ReadNumbers function will then read the text file and display the numbers sorted. In order to sort the numbers, read the big string and then split it into a list. Now convert them into integers by using list comprehension and then sort the list. Loop through the list and print each…arrow_forwardPlease help me with this question to built it in python. Your company keeps a list of employee information for each pay period in a text file. The format of each line of the file is following: <name>, <rate>, <hours worked>. Write a program that inputs a file from the user and prints to the terminal a report of the wages paid to the employees for the given period. The report should be in tabular format with the appropriate header. Each line should contain employee's name, the hours worked, and the wages paid for that period.arrow_forwarduse c++ programing language. Read two integer number from an input file called input.txt, then add these two numbers , store it in a variable called TOTAL, find the difference of the two numbers , store it in Difference, find product to the two numbers , store it in a variable called Multiply, fine quotient of the two number call it Division, find modular division of them and store it in a variable called MUD.arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education





