Need help with your Discussion

Get a timely done, PLAGIARISM-FREE paper
from our highly-qualified writers!

glass
pen
clip
papers
heaphones

University of Guadalajara DR Raquet Programming Language Worksheet

University of Guadalajara DR Raquet Programming Language Worksheet

University of Guadalajara DR Raquet Programming Language Worksheet

Description

Dr. Raquet language program

Implement the following functions. Functions should return values which will can then be printed by racket (as a result of the function call).
Include display/printf statements as necessary to label the results (of the function calls) in order to demonstrate that your code works properly.
Functions should not internally contain display or printf statements within other than when you are tracing/debugging the code. Email your racket file to me when done (normally a .rkt extension).

Write two functions to convert between miles and kilometers: kilometres(miles) → kilometres and miles(km) → miles. To get from miles to kilometers, multiply by 1.609. To convert the other way, multiply by 0.6215.
To demonstrate that each function works, you might have something like the following:
; using display
(display “(miles-to-km 10) = “)(miles-to-km 10)(newline)(newline)

; Or, using printf
(printf “(miles-to-km 10) = ~an” (miles-to-km 10))

Give the values returned by each of the following function calls in Dr. Racket.
You can mainly just label the output, and look at each to understand what they do.
(define (foo x y)
(+ x y (- x)))
Expression:

(foo (- 2) 4)
(define (a b c d)
(e b c d))

(define f +)

(define e f)
Expression:

(a (+ 3 2) (* 4 5) 3)
(define (a1 b c d)
((e1 (f1 b)) c d))

(define (e1 a)
a)

(define (f1 a)
(if (positive? a)
+
-))
Expression:

(a1 1 (+ 2 3) 4)
Rewrite the following functions so that the definitions are nested lexically within each other.
Only the entry procedure baz should be visible in the global environment. Take advantage of lexical scoping to remove redundant parameters.

(define (foo a)
(* a (+ a 2)))

(define (bar a b)
(if (= a 14)
b
(bar (+ a 1) (+ (foo a) b))))

(define (baz n)
(bar 3 n))
Write a function sum-range (from-to) for finding the sum of integers in the range from to, inclusive.
Make sure that (sum-range 4 18), (sum-range 18 4), and (sum-range 7 7) all give the expected result.
Note that this function should be able to count up or count down depending on the order of the paramaters.
So, (sum-range 4 18) and (sum-range 18 4) should give the same result. (sum-range 7 7) should return 7.

Have a similar assignment? "Place an order for your assignment and have exceptional work written by our team of experts, guaranteeing you A results."

Order Solution Now

Our Service Charter


1. Professional & Expert Writers: Eminence Papers only hires the best. Our writers are specially selected and recruited, after which they undergo further training to perfect their skills for specialization purposes. Moreover, our writers are holders of masters and Ph.D. degrees. They have impressive academic records, besides being native English speakers.

2. Top Quality Papers: Our customers are always guaranteed of papers that exceed their expectations. All our writers have +5 years of experience. This implies that all papers are written by individuals who are experts in their fields. In addition, the quality team reviews all the papers before sending them to the customers.

3. Plagiarism-Free Papers: All papers provided by Eminence Papers are written from scratch. Appropriate referencing and citation of key information are followed. Plagiarism checkers are used by the Quality assurance team and our editors just to double-check that there are no instances of plagiarism.

4. Timely Delivery: Time wasted is equivalent to a failed dedication and commitment. Eminence Papers are known for the timely delivery of any pending customer orders. Customers are well informed of the progress of their papers to ensure they keep track of what the writer is providing before the final draft is sent for grading.

5. Affordable Prices: Our prices are fairly structured to fit in all groups. Any customer willing to place their assignments with us can do so at very affordable prices. In addition, our customers enjoy regular discounts and bonuses.

6. 24/7 Customer Support: At Eminence Papers, we have put in place a team of experts who answer all customer inquiries promptly. The best part is the ever-availability of the team. Customers can make inquiries anytime.

We Can Write It for You! Enjoy 20% OFF on This Order. Use Code SAVE20

Stuck with your Assignment?

Enjoy 20% OFF Today
Use code SAVE20