|
Write down the answers in the space provided. Do not attach any extra sheets. Use what you know from the lectures, labs, and the assigned readings from the books. Do not use any extra knowledge about The Beginning Student Language.
The phrase ``develop a program'' means to design a program according to one of the recipes. You are not required to provide a template unless the problem specifically asks for one. However, be prepared to struggle with the development of function bodies if you choose to skip the template step.
Grader: V. Proulx
Points: 2pt
Write a purpose and contract for a function that computes the number of calories per serving for snack chips. It consumes the number of servings and calories for a bag.
;;
|
Grader: V. Proulx
Points: 3pt
Write the purpose, contract, and two examples for a function that computes the surface area of a cube given the length of a side.
;;
|