CSC 160 Fall 2014 - Homework 2 (100 points)
Assigned Sept 15, due MON Sept 22
1) Assignments submitted on Moodle with time stamps during
class time (Mon or Wed 4:15-5:30pm) will be given a grade of ZERO.
2) Start this homework as soon as possible so that you have time to get any help you may need
from the instructor or course tutor prior to when the assignment is due.
3) Do not start the exercises until to have fully read and fully understood the corresponding
textbook sections. If there is something you do not fully understand, you must contact
the instructor or course tutor prior to starting the assigned exercises.
[10 pts.] Another PSP Handout
Read the Chapter 3 handout. (Handout will be given out in class on Mon 9/15.)
Start the Time Recording Log. For the next week, fill it out anytime you do an activity related to this course.
Submit on paper in class by the due date OR Moodle with the filename "hw2LASTNAMEpsp".
[45 pts.] Chapter 1C
Read Sections 1.7-1.10 of the textbook.
Do the following exercises on paper:
1.7.2: Show the sequence of steps the Stepper would take in
evaluating the expression (beside (rotate-ccw
) (rotate-cw
) ) .
[Reminder: At each step (but the last), you need to underline the sub-expression that's about to
be replaced (i.e., the way Exercise 1.7.1 is done in the textbook).]
1.8.3: Draw a box diagram
to prove that (rotate-cw
) is a legal expression.
1.8.6: Start drawing a box diagram to try to prove that
(rotate-cw 
is
a legal expression. Stop when you cannot draw any more boxes, and say in a full sentence why it is not a legal expression.
1.8.9a: Draw a box diagram around your
solution to exercise 1.5.2 from HW1b to prove that it is a legal expression.
Submit on paper in class by the due date OR on Moodle with the filename "ch1LASTNAMEpaper".
[20 pts.] Chapter 2A
Read Sections 2.1-2.3 of the textbook.
Do Exercise 2.1.3 in DrRacket, with the specific directions given here:
In the Definitions Pane:
a) Store a picture in a variable.
b) Then define another variable named two-copies whose value is two copies
of that picture, one beside the other, by using the previous variable.
c) Then define a third
variable named six-copies whose value is a six-pack of the
picture, 2 wide by 3 high, by using two-copies.
d) Then press Run.
In the Interactions Pane:
Type the name of the first variable
into the Interactions Pane and press Enter. Make sure you got the result
you expected. Repeat for the other 2 variables.
Save the Definitions Pane to your computer or flash drive with the filename "ch2aLASTNAMEdef.rkt".
Save the Interactions Pane to your computer or flash drive with the filename "ch2aLASTNAMEint.rkt".
Upload these files to Moodle, using the link for HW2. (Do not click Send for Marking yet, so that you can upload the other files in this assignment!)
[25 pts.] Chapter 2B
Read Sections 2.4-2.6 of the textbook.
Do the following exercises on paper:
2.4.2: Draw a box diagram to prove that
(rotate-cw calendar) is a legal expression. Assume that
calendar is already defined.
2.4.3b: Draw a box diagram for each of the three
expressions in your solution to Exercise 2.1.3* to prove they are all legal
expressions.
Submit on paper in class by the due date OR on Moodle with the filename "ch2LASTNAMEpaper".
| GRADING |
| Question |
Point Value |
| PSP |
10 |
| 1.7.2 |
15 |
| 1.8.3 |
10 |
| 1.8.6 |
10 |
| 1.8.9a |
10 |
| 2.1.3 |
20 |
| 2.4.2 |
10 |
| 2.4.3b |
15 |
| Total |
100 |
Last Modified: 9/15/14