Assignment 1

Due Date : 9/18 @ 11:59pm

Problem 1

A car accelerates at 7 meters per square-second like this:

after t = 0 1 2 3 4 ... 10 ... 15 seconds
it has traveled 0.0 3.5 14.0 31.5 56.0 ... ?? ... ?? meters

Guess a formula for calculating how far the car has gotten in t seconds.

Check the formula for the first five table entries. If it doesn't work, guess more.

Once the formula works for the first five entries, use it and a calculator or DrRacket's Interactions Window to fill in the two boxes with ?? in the above table.

Problem 2

An older woman suffering from type II diabetes injects insulin based on measurements of her blood sugar level. If the blood sugar level is less than 115, she doesn't need to inject any insulin at all. For a value of 115, she injects 1 unit of insulin. For every additional increase of 20 in her blood sugar level, she gets one additional unit of insulin. (Thus, for a blood-sugar level of 134, she gets 1 unit; for a blood-sugar level of 135, she gets 2 units.)

How much insulin does she need to inject for a blood sugar level of 140? 180?

Make a table that shows the number of units of insulin injected for blood sugar values of 100, 110, 120, ..., 200.

Create a formula for calculating the insulin injections.

Use the formula to determine how many units of insulin the woman needs to inject for a blood sugar level of 290.

Problem 3

A boy gets retained by a neighborhood association to distribute fliers, collect dues, and do miscellaneous chores. Just to make sure he is around when needed, he gets 40 dollars a month (he doesn't have to work for that). For every hour he works, he gets $11.25.

How much does he get if he works 2 hours? 5 hours? 10 hours? per month.

Make a table that shows the results.

Create a formula for calculating how much the boy earns if he works H hours.

Use the formula and the Interactions Window in DrRacket to find out how much the boy earns when a major event forces him to work for 100, 132, and 141 hours in a single month.

Problem 4

The total cost of attending Northeastern University includes tuition, room and board, and "student fees" (plus travel, books, and miscellaneous personal expenses, but we'll leave those out to keep things simple).

Write a "Beginner Student Language" (BSL) expression that computes the total cost of attending Northeastern for 1 semester.

(Hint: http://www.neu.edu/admissions/costs/tuition.html)

Assuming a student takes 4 classes a semester, there are two semesters a year, and each class meets 3 times a week for 13 weeks, write a BSL expression that computes the cost of each lecture (or, equivalently, what do you pay to sleep late and skip one lecture).