Referenced from lesson Restating the Problem
Directions: Getting a gym membership costs $150, and then there’s a $45/month fee after that. Write a function globo-gym
that takes in a number of months and produces the cost of a membership for that many months.
Contract and Purpose Statement |
Every contract has three parts…
; _________:_______->______
; __________________________________________________________________________________________
Examples |
Write some examples, then circle and label what changes…
(EXAMPLE (_________ __)________________)
(EXAMPLE (_________ __)________________)
Definition |
Write the definition, giving variable names to all your input values…
(define (_________ _______)
_______________________)
Directions: The cost of a ride is a starting price of $2.50, plus $1.50/mile. Write a function rideshare
, that takes in a number of miles and produces the cost of that right.
Contract and Purpose Statement |
Every contract has three parts…
; _________:_______->______
; ______________________________________________________________________________
Examples |
Write some examples, then circle and label what changes…
(EXAMPLE (_________ __)_________________)
(EXAMPLE (_________ __)_________________)
Definition |
Write the definition, giving variable names to all your input values…
(define (_________ ______)
_______________________)
These materials were developed partly through support of the National Science Foundation, (awards 1042210, 1535276, 1648684, and 1738598). Bootstrap:Algebra by Emmanuel Schanzer, Jen Poole, Ed Campos Jr, Flannery Denny, and Dorai Sitaram 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.