Homework 1

Due: 10:00am, Fri Jan 21, 2011

100 points

For this assignment, set the DrScheme Language to Beginning Student with List Abbreviations (under How to Design Programs). Your assignment will be graded using the specified language level. If you use a different language level, your code may not work when it is graded.

  • Carefully follow the Sample Solution to a Programming Problem in the Scheme HW Guide. Less than half of the credit for each programming problem is based on the the correctness of your code as determined by our test cases. Most of the grade is based on how well you follow the design recipe.
  • Do the following problems from the online text (HTDP):
    • 104 (15 pts) from Intermezzo BSL
    • 105 (15 pts) from Intermezzo BSL
    • 115 (14 pts) from Section 9.3
    • 116 (14 pts) from Section 9.3
    • 118 (14 pts) from Section 10.1
    • 119 (14 pts) from Section 10.1
    • 121 (14 pts) from Section 10.1  Note: string-append is defined in Section 1.2.
  • Notes:
    • Be sure to do all the assigned parts of each problem. In the book, each problem ends with a block icon. Online, each problem ends with a hand icon.
    • Read chapter 9 very carefully before doing the problems from that chapter. This chapter is not padded with lots of wordy examples. In writing hand evaluations for problems 104 and 105, follow the same format as the evaluation examples given in the Scheme HW Guide.
    • To follow the design recipe, you must write down the purpose, signature, at least 5 well-chosen examples, write the code for the function, and include illustrative test cases for the function (using at least the examples you developed ahead of time).  Bundle the examples and test cases together as a block of check-expect invocations. Your chosen examples should illustrate the output you expect, and the test cases should produce the actual output (they should not be commented). If the function processes an inductive type, make sure that your examples include the base case(s) and sample inductive cases.

Submit your homework using TBA.

  • No labels