1 Euclidean Distance
2 Zoo Animals

Problem Set 2

Language: Beginning Student
Due: 11:59 PM Sunday Jan. 20

Remember to use the design recipe to craft your functions -- in particular, include a signature, purpose, and tests, and (for this assignment) also include commented templates for each function.

1 Euclidean Distance

These functions are similar. Avoid “copied code” in their definitions.

  • Design a function direct-to-0 that determines a posn’s distance from the origin. Leave the template commented out in the solution you submit.

  • Design a function direct-between that determines the distance between two posns. Leave the template commented out in the solution you submit.

2 Zoo Animals