Self-Test 4

Using the anonymous variable
 
You are advised to write down the solutions for all questions before you look at the answers.
 
  Copy and paste the structures given below into a file and use them to answer the questions that follow
 

     student(s1, simon, 21, falmouth).      student(s2, sally, 19, bristol).      student(s3, john, 20, london).      student(s4, wendy, 20, london).      course(c1, nlp, peter).      course(c2, image_proc, ela).      course(c3, artificial_intell, bob).      mark(s1, c1, 67.0).      mark(s1, c3, 59.0).      mark(s2, c1, 52.0).      mark(s2, c3, 49.0).      mark(s3, c2, 56.0).      mark(s3, c3, 54.0).      mark(s4, c1, 68.0).      mark(s4, c3, 60.0).
Formulate queries to retrieve the following information, using anonymous variables to replace unnecessarily named variables:
   
1.
What is the name of the student who comes from Falmouth?
 
2.
What mark did Sally get in course c3?
 
3.
What mark did Wendy get in NLP?