;; The first three lines of this file were inserted by DrRacket. They record metadata
;; about the language level of this file in a form that our tools can easily process.
#reader(lib "htdp-beginner-reader.ss" "lang")((modname line-part) (read-case-sensitive #t) (teachpacks ()) (htdp-settings #(#t constructor repeating-decimal #f #t none #f () #f)))
; num -> num
; Converts F-degrees f to C-degrees
(define (f2c f)
(* (- f 32) 5/9))
(check-expect (f2c 32) 0)
(check-expect (f2c 212) 100)
; num -> string
; determines whether n is on zero, to the left, or to the right
; on a number line
(define (line-part n)
(cond
[(= n 0) "zero"]
[(< n 0) "left"]
[(> n 0) "right"]))
(check-expect (line-part 0) "zero")
(check-expect (line-part -3) "left")
(check-expect (line-part 3) "right")