This assignment is due on Sunday, April 24 at 11:59pm. Submit it using Handin as assignment lecture29. You only need to submit the first exercise.
; A Formula is one of: ; - Number ; - "x" ; - (make-add Formula Formula) ; - (make-mul Formula Formula) (define-struct add [first second]) (define-struct mul [first second])
(define formula1 (make-add (make-add (make-mul "x" "x") (make-mul 2 "x")) 1))
(check-expect (eval formula1 10) 121)
For the rest of this page, you don’t need to submit anything.
(check-expect (eval (dx formula1) 10) 22)
The code we will go over in class is available for your reference. To download it, don’t use “Save Page As” or “Save As”; use “Save Link As” or “Download Linked File” in your Web browser. If you can’t find the command, try right-clicking or two-finger-tapping or long-pressing.
Optional: watch as a computer scientist explains machine learning in 5 levels of difficulty.