(Solved) : Scheme Text Format Pasted Q1 Define Procedure Takes Number X Number Y Returns Following 1 Q42744439 . . .

It is in Scheme! text format pasted

Q1: Over or Under

Define a procedure over-or-under which takes in a number x and anumber y and returns the following:

  • -1 if x is less than y
  • 0 if x is equal to y
  • 1 if x is greater than y

(define (over-or-under x y)

‘YOUR-CODE-HERE

)

;;; Tests

(over-or-under 1 2)

; expect -1

(over-or-under 2 1)

; expect 1

(over-or-under 1 1)

; expect 0

Q1: Over or Under Define a procedure over-or-under which takes in a number x and a number y and returns the following: • • •

Q1: Over or Under Define a procedure over-or-under which takes in a number x and a number y and returns the following: • • • -1 if x is less than y O if x is equal to y 1 if x is greater than y (define (over-or-under x y) ‘YOUR-CODE-HERE ii Tests (over-or-under 1 2) ; expect -1 (over-or-under 2 1) ; expect 1 (over-or-under 1 1) ; expect 0 Show transcribed image text Q1: Over or Under Define a procedure over-or-under which takes in a number x and a number y and returns the following: • • • -1 if x is less than y O if x is equal to y 1 if x is greater than y (define (over-or-under x y) ‘YOUR-CODE-HERE ii Tests (over-or-under 1 2) ; expect -1 (over-or-under 2 1) ; expect 1 (over-or-under 1 1) ; expect 0

Expert Answer


Answer to It is in Scheme! text format pasted Q1: Over or Under Define a procedure over-or-under which takes in a number x and a n…

Leave a Comment

About

We are the best freelance writing portal. Looking for online writing, editing or proofreading jobs? We have plenty of writing assignments to handle.

Quick Links

Browse Solutions

Place Order

About Us