6.6
Assignment 2
Programming Language BSL
Due Date Thurs 1/12 at 11:59pm
Possible Points 9
Purpose To write simple functions.
For this assignment and all future assignments you must upload a .rkt file in the specified language at the top of the assignment. Failure to do so will result in a 0. No exceptions. This will also be the last individual assignment of the semester. Future assignments will be submitted with lab partners (to be assigned on Friday, 1/13, in lab).
Graded Exercises
Exercise 1 Write a function that adds 3 to a number.
Exercise 2 The following table describes how far a person has gone in a race in a certain amount of seconds:
t =
1
2
3
4
5
6
7
8
9
10
d =
2
5
8
11
14
17
20
23
?
?
Write a function that predicts, based on this data, how far they will have run at time t. Write two check-expects that test to see the data in the table matches your function’s output, and then write one more that sees where they will go when t is at least 9.