Problem 1: Over or Under (100pts)
Define a procedure over-or-under
which takes in a number a
and a number b
and returns the following:
- -1 if
a
is less thanb
- 0 if
a
is equal tob
- 1 if
a
is greater thanb
(define (over-or-under a b)
'YOUR-CODE-HERE
)
;;; Tests
; scm> (over-or-under 1 2)
; -1
; scm> (over-or-under 2 1)
; 1
; scm> (over-or-under 1 1)
; 0
Remember, you can test your implementation with ok:
$ python ok -q over-or-under