Lecture 2 Objectives


At the end of today's class you should

KNOW:

BE ABLE TO:

Sample Exam Question:

Define a function called tip that will add a 15% tip to a given number. Write a contract and a purpose for your function. Then define a function called share-with-tip that computes the share of the cost of a pizza, including the cost of the tip (refer to your answer to yesterday's sample exam question). Write a contract and purpose for share-with-tip.