Question: Programming Exercise (50 points) In this assignment, you will be learning Scheme through the use of Dr. Racket. We would like to start with some

 Programming Exercise (50 points) In this assignment, you will be learning

Scheme through the use of Dr. Racket. We would like to start

Programming Exercise (50 points) In this assignment, you will be learning Scheme through the use of Dr. Racket. We would like to start with some basic concepts; trying to under prefix notation and the use procedure in Scheme. You will also implement nested procedures and recursive procedures. You may only use the procedures shown in the text and slides - not any of the additional library procedures in Scheme 1. Using Dr. Racket to compute the following expressions [5 points] 1.1 19 1225 33 1.2 15(16+5/3)-127 1.3 121(15 (4 3)(19/4))* 14 1.4 (2233)* (21((15/6) (3 4))(5-7))) 2 Bind (define) each value in question 1.5 above to its' English text and then change the expression using the defined names For example, the expression 82 10 should be replaced with names eight, two, and ten, and the correct corresponding expression is (eight+ two - ten), of course, in prefix notation [5 points] 3 Define a procedure called "Subtract" that takes two parameters and returns the difference of them You can use the built-in "-" to define your Subtract procedure [5 points] > (Subtract 120 50) 70 4 Define a recursive procedure called "IntDivide" that will compute the quotient of x divided by y You must implement IntDivide procedure by a sequence of "Subtract" procedures that you defined in question 3 (1) You must recursion to implement the iteration (2) You will need to account for negative values as well Hint: This will require a conditional and possibly the (abs x) procedure. You may not use the built-in division or quotient operators in this procedure definition [10 points] >(IntDivide 8 3) >(IntDivide 8-3) Programming Exercise (50 points) In this assignment, you will be learning Scheme through the use of Dr. Racket. We would like to start with some basic concepts; trying to under prefix notation and the use procedure in Scheme. You will also implement nested procedures and recursive procedures. You may only use the procedures shown in the text and slides - not any of the additional library procedures in Scheme 1. Using Dr. Racket to compute the following expressions [5 points] 1.1 19 1225 33 1.2 15(16+5/3)-127 1.3 121(15 (4 3)(19/4))* 14 1.4 (2233)* (21((15/6) (3 4))(5-7))) 2 Bind (define) each value in question 1.5 above to its' English text and then change the expression using the defined names For example, the expression 82 10 should be replaced with names eight, two, and ten, and the correct corresponding expression is (eight+ two - ten), of course, in prefix notation [5 points] 3 Define a procedure called "Subtract" that takes two parameters and returns the difference of them You can use the built-in "-" to define your Subtract procedure [5 points] > (Subtract 120 50) 70 4 Define a recursive procedure called "IntDivide" that will compute the quotient of x divided by y You must implement IntDivide procedure by a sequence of "Subtract" procedures that you defined in question 3 (1) You must recursion to implement the iteration (2) You will need to account for negative values as well Hint: This will require a conditional and possibly the (abs x) procedure. You may not use the built-in division or quotient operators in this procedure definition [10 points] >(IntDivide 8 3) >(IntDivide 8-3)

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!