- Use a full sheet of 8½ x 11" paper. (Half sheet? Half credit!)
- Put your last name and first initial in the far upper left hand corner!
- No need to write out questions.
- Numbering responses may help you avoid overlooking a question; it's ok to go ahead and pre-number your sheet.
- Time: 3:30; Four one-point questions and a half-point EC
Quiz 8; March 1; Time: 3:30; 4 points
- What are the names of the ports in the four port model?
- What does Prolog do if a rule's very first clause fails?
- What is the output of the following query?
?- A=5, writeln(A), write(B), B=7, B=A, write(done).
- Write a rule
positive(N)
that succeeds iff (if and only if) N
is
an integer that is greater than zero.
?- positive(5).
true.
?- positive(apple).
false.
EC ½ pt: What's the output of the following query?
A=5, B=7, write(A=B+A).