Self-test 4 Solutions

Using the anonymous variable
 
 
1.
| ?- student(__, Name, __, falmouth).  

  Name=simon

 
 
2.
| ?- student(Numb, sally, __, __), mark(Numb, c3, Mark).

  Numb=s2
 
  Mark=49
 
 
3.
| ?- student(SNumb, wendy, __, __), course(CNumb, nlp,__), mark(SNumb, CNumb, Mark).

  SNumb=s4

  CNumb=c1

  Mark=68