Referenced from lesson Restating the Problem

Directions: Write a function minimum-wage, that takes in a number of hours worked and returns the amount a worker will get paid at $10.25/hr.

Contract and Purpose Statement

Every contract has three parts…​

# ____________::______->______

# ___________________________________________________________________________

Examples

Write some examples, then circle and label what changes…​

examples:

______________ (_)is _________

______________ (__)is __________

end

Definition

Write the definition, giving variable names to all your input values…​

fun ____________(_____):

_______________

end

Directions: Write a function tip-calculator that takes in the cost of a meal and returns the 15% tip for that meal.

Contract and Purpose Statement

Every contract has three parts…​

# ______________::______->______

# ____________________________________________________________________________________

Examples

Write some examples, then circle and label what changes…​

examples:

________________ (__)is _________

________________ (__)is _________

end

Definition

Write the definition, giving variable names to all your input values…​

fun ______________(____):

_____________

end

These materials were developed partly through support of the National Science Foundation, (awards 1042210, 1535276, 1648684, and 1738598). CCbadge Bootstrap:Integrated Oklahoma by Jen Poole is licensed under a Creative Commons 4.0 Unported License. Based on a work at www.BootstrapWorld.org. Permissions beyond the scope of this license may be available by contacting schanzer@BootstrapWorld.org.