Here are sample sessions from giving two exams that a teacher might want to program using your language.

A Math exam

Two different students took the same math exam. The following two examples show the students' interactions with the exam program. Your language should be sufficient to create one exam that could yield these two different interactions based on students' answers.

Student #1

> (give-exam math-exam)
What is 3*4+2?
Ans: 14
What is 2+3*4?
Ans: 20
What is 5+2*6?
Ans: 42
You seem to be having trouble with these.  Try again.
What is 3+5*2?
Ans: 13
What is the reduced form of 12/18?: (1) 6/9  (2) 1/1.5  (3) 2/3
Ans: 3
What is 8+3*2?
Ans: 11
You got 40% of the arithmetic problems right
You got 100% of the fractions problems right

Student #2

> (give-exam math-exam)
What is 3*4+2?
Ans: 14
What is 2+3*4?
Ans: 14
What is 5+2*6?
Ans: 19
What is the reduced form of 12/18?: (1) 6/9  (2) 1/1.5  (3) 2/3
Ans: 3
What is 1/4 + 1/2?: (1) 3/4  (2) 1/6  (3) 2/6
Ans: 1
You got 66% of the arithmetic problems right
You got 100% of the fractions problems right

A WPI history exam

This session reflects a different exam run with your testing system, but a teacher should be able to use the same language to write down both this exam and the math exam.

> (give-exam wpi-history)
When was WPI founded?
Ans: 1900
Let's see if you know your WPI personalities.
What is Gompei?
Ans [type hint for a hint]: hint
Think bleating
Ans: goat
Who was the first president of WPI?: (1) Boynton  (2) Washburn  (3)
Thompson
Ans: 1
You got 50% of the personalities questions right
Name one of the two towers behind a WPI education
Ans: boynton
You got 50% of the questions right
There's more WPI history on the web.  And life.

Return to the assignment page