on-top?. It takes a point
and returns true if it is in the uppermost 50 pixels of the window.
above-diagonal?. It takes in a posn and
returns true if the point is above the diagonal. [Hint: In
Racket, the diagonal goes from the top left corner (also known as the
origin) to the bottom right corner.]scale-posn which takes in a
number and a posn, and returns a posn formed by multiplying the number by
each of the coordinates of the input posn.
For example, (scale-posn 3 (make-posn 2 5)) "should be"
(make-posn 6 15).| Grading | Contract & Purpose |
Data Analysis | Examples | Skeleton w/Inventory |
Add details to skeleton |
Fill in the function body |
| 30 points: on-top? | /3 | /3 | /3 | /3 | /3 | /15 |
| 30 points: Exercise 20.4.2 | /3 | /3 | /3 | /3 | /3 | /15 |
| Extra Credit: 20.5.3 | /2 | n/a | /2 | /2 | /2 | /12 |
Last Modified: 12/9/13