CSC 160 Spring 2015 - Homework 2 (100 points)
Assigned Feb 9, due MON Feb 16
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 you 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.
[45 pts.] Chapter 1C
Read Sections 1.8-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 HW1c to prove that it is a legal expression.
Submit on paper in class by the due date OR on Moodle with the filename "ch1cLASTNAMEpaper".
[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".
[10 pts.] Moodle Forum #2
Write and post a question you have about your reading of Chapters 1 or 2 in the text. [Note: You CANNOT ask how to do one of the assigned homework exercises.]
Write and post a response (at least 2 to 3 sentences) to someone else's question. You will be graded on the fullness and accuracy of your response.
GRADING |
Question |
Point Value |
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 |
Forum #2 |
10 |
Total |
100 |
Last Modified: 2/2/15