|
home—lectures—recipe—exams—hws—D2L—breeze (snow day; distance)
Due: Sep.12 (Mon) 14:00, on D2L and hardcopy.
Your submitted file should be named “hw02.rkt” as plain-text (which is what DrRacket saves as).
Standard instructions for all homeworks:
Of course, Pizzas have topping in the middle, and crust around the edge. (You can think of the full pizza being a disc, with a smaller pure-topping-covered disc inside of it.)
For now, your code does not need to give a correct
answer for pizzas whose diameter is less
than twice the
Note that this is a computer-sciency definition of “suffix”.
It has nothing to do with syllables or English.
More precisely:
we say that string a has b as a suffix, iff:
there exists a string x such that
hint:You can certainly usecond (orif ) if you like, but they're not actually needed; you can instead use amin ormax in a clever (but standard) way.
Friday: We will mentionif in class on Friday.
In addition to the standard instructions for all hws above, here are some requirements for our homeworks:
For every functions you write, follow the design recipe, steps 4,5,7,8. (You don't need to label each step; just turn in the final result.) When grading, there are points for having a good purpose-statement, good tests, etc. In general, test cases alone can be worth nearly half the points.
1 We'll see later how, in a declarative language (Prolog), this definition alone constitutes runnable code. ↩
home—lectures—recipe—exams—hws—D2L—breeze (snow day; distance)
©2016, Ian Barland, Radford University Last modified 2016.Sep.16 (Fri) |
Please mail any suggestions (incl. typos, broken links) to ibarlandradford.edu |