subject

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

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 09:00
Which best describes the condition under which the unicode output is the same as plain text?
Answers: 3
question
Computers and Technology, 22.06.2019 15:20
The north and south regions had very diferent economies in the 1800s.
Answers: 1
question
Computers and Technology, 23.06.2019 12:40
According to the video what are some tasks petroleum engineers perform check all that apply
Answers: 2
question
Computers and Technology, 23.06.2019 14:30
Choose the answers that best complete each sentence. on average,are more expensive than other kinds of postsecondary schools. the cost of room and board includes. to save money, some students attend auniversity in their home state.
Answers: 2
You know the right answer?
1. Define a procedure (Divide x y) that takes two parameters x and y and returns the division result...
Questions
question
Biology, 19.10.2019 09:30
question
Mathematics, 19.10.2019 09:30
Questions on the website: 13722367