Question: Example 2: Simple calculator and user interaction 'Not to mention commenting on the results / critical evaluation of the results () 3.1. (Script 1) You

 Example 2: Simple calculator and user interaction 'Not to mention commentingon the results / critical evaluation of the results () 3.1. (Script

Example 2: Simple calculator and user interaction 'Not to mention commenting on the results / critical evaluation of the results () 3.1. (Script 1) You are supposed to MODIFY example script provided in the Example 2 so that it would perform operations " "+", "--", "*", "/" (only the whole part of the division operation, ignore the reminder part) and (power). When it comes to the first four operations, they are normally supported by "let" command or the other alternative ways of calculating numerical expressions mentioned in the lecture slides (and these are actually already programmed in the Example 2). However, the power operation will need to be implemented by you, probably in the form of some sort of loop operations (I am leaving this to you to decide). Once you write the script, you will be required to upload it to the scriptcheck.cms.gre.ac.uk system for test purposes. The marking system will assume that the script will be processing three command line parameters, one for the first argument of arithmetic operation, the second command line parameter for the second argument of the arithmetic operations and third parameter expressing the arithmetic operation to be processed. Your script will be executed from the command line, for example, in order to check if your solution is correct it might be executed as: scriptname 42 "operation" for the example execution parameters ( 4 and 2) it should return: - 42+6 - 42Nx2 - 42w*s8 - 42/"p+2 - 42NNN16

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!