Referenced from lesson Defining Functions

Match the EXAMPLEs on the left with the definitions on the right. NOTE: Some definitions may not match any examples!

Examples Definition

(EXAMPLE (mystery 30) (circle 30 "outline" "red")) (EXAMPLE (mystery 10) (circle 10 "outline" "red"))

2

A

(define (mystery w) (rectangle w 10 "outline" "red"))

(EXAMPLE (mystery 2) (+ 2 2)) (EXAMPLE (mystery 4) (+ 4 4)) (EXAMPLE (mystery 5) (+ 5 5))

5

B

(define (mystery num) (* num 2))

(EXAMPLE (mystery "red") (circle 10 "solid" "red")) (EXAMPLE (mystery "orange") (circle 10 "solid" "orange"))

1

C

(define (mystery num) (+ num num))

(EXAMPLE (mystery 30) (rectangle 20 30 "solid" "red")) (EXAMPLE (mystery 20) (rectangle 20 20 "solid" "red")) (EXAMPLE (mystery 10) (rectangle 20 10 "solid" "red"))

4

D

(define (mystery h) (rectangle 20 h "solid" "red"))

(EXAMPLE (mystery 30) (rectangle 30 10 "outline" "red")) (EXAMPLE (mystery 10) (rectangle 10 10 "outline" "red"))

3

E

(define (mystery r) (circle r "outline" "red"))

5

F

(define (mystery c) (circle 10 "solid" c))

These materials were developed partly through support of the National Science Foundation, (awards 1042210, 1535276, 1648684, and 1738598). CCbadge Bootstrap:Algebra by Emmanuel Schanzer, Jen Poole, Ed Campos Jr, Flannery Denny, and Dorai Sitaram is licensed under a Creative Commons 4.0 Unported License. Based on a work at www.BootstrapWorld.org. Permissions beyond the scope of this license may be available by contacting schanzer@BootstrapWorld.org.