Computers and Technology

1. Define a procedure (Divide x y) that takes two parameters x and y and returns the division result x/y. Then, call your procedure using Test case:
> (Divide 10 3)
3 1/3
2. Define a recursive procedure called (nDivide x y n) with three parameters x, y and n. It returns the result of x divided by y n times: x/y/y/.../y. Instead of using "[", you must use the Divide function that you developed in the previous question.
Test case:
> (nDivide 10 3 4)
10/81
3. Define a procedure (Dividen Divide u vxy n) that will computes the division result of two nDivide procedures: (n Divide u v n) and (nDivide x y n). You must call Divide procedure and procedure that you have defined in questions 2 and 3.
Test case:
> (Dividen Divide 64 2 10 3 4)
32 5/6
4. Re-implement the procedure Dividen Divide and name it (Dividen DivideLet u vxy n). In this question, you must use let-form to redefine the global procedures that you used in the previous questions. More specifically, you will use let-form to redefine Divide and nDivide as unnamed procedures and use them in the Dividen DivideLet procedure. Hint: Follow the car ABS and Traction control example given in the lecture.
Test case:
> (Dividen DivideLet 64 2 10 3 4)
32 2/5

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 04:30, kkeith121p6ujlt
Eye injuries usually occur as a result of all of the following things, except: a) proper machine operation b) battery explosion c) falling or flying debris d) electric welding arc
Answers: 2
image
Computers and Technology, 23.06.2019 08:30, Bradgarner772
Based on your knowledge of a good network, describe what you think is a perfect network would be. what kind of information and resources could users share on this network. what would the network administrator do? what kind of communication would be used?
Answers: 1
image
Computers and Technology, 23.06.2019 11:30, magicalpenguin48
In cell h5 enter a formula that will calculate the percentage of attendees that went to the altamonte springs job fair in 2018.
Answers: 1
image
Computers and Technology, 24.06.2019 10:10, juliana0122
Scanning the road can be thought of as a
Answers: 2
Do you know the correct answer?
1. Define a procedure (Divide x y) that takes two parameters x and y and returns the division result...

Questions in other subjects:

Konu
Mathematics, 09.07.2019 13:30
Konu
Spanish, 09.07.2019 13:30
Konu
Mathematics, 09.07.2019 13:30