6. The answers submitted by five students to a true/false quiz are as follows: Teresa: true, true,...

Question:

6. The answers submitted by five students to a true/false quiz are as follows:

Teresa: true, true, false, true, false Tim: false, true, true, true, false Tania: true, false, true, true, false Tom: false, true, true, false, true Tony: true, false, true, false, true Tania got more answers right than Teresa did. Tom got more right than Tim. Tony did not get all the answers right, nor did he get them all wrong. Write a Prolog program to find the correct answers to the quiz.
Hint: Write a predicate grade(s1, s2, s3, s4, s5, a1, a2, a3, a4, a5, n) that holds when n is the number of correct answers when a student submits the si, and the correct answers are the ai. (So grade counts the matches between the si and ai.)

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: