General
Material
Lecture 1
 Slides Practical Session
Lecture 2
 Slides Practical Session
Lecture 3
 Slides Practical Session
Lecture 4
 Slides Practical Session
Lecture 5
 Slides Practical Session

# Solutions

Line 5 is: `Scare(hagrid,dudley).`
Functors always have to be atoms, but atoms cannot start with a capital letter.
Correction: `scare(hagrid,dudley).`

Line 11: `hate(uncle vernon,X) :- magical(X).`
Atoms cannot contain spaces (and neither can variables, by the way) unless the whole atom is enclosed in single quotes. So, the problem is `uncle vernon`.
Correction: `hate(uncle_vernon,X) :- magical(X).` or `hate('uncle vernon',X) :- magical(X).`

Line 14: `hate(aunt_petunia,X :- magical(X).`
The head of the rule (what comes before `:-`) should be a complex term. All arguments have to be between an opening and a closing parenthesis. In Line 14, the closing parenthesis is missing.
Correction: `hate(aunt_petunia,X) :- magical(X).`

Line 17: ```hate(aunt_petunia,X) :- scare(X,dudley)```
All clauses (facts and rules) have to end with a full stop. In Line 17, this full stop is missing.
Correction: ```hate(aunt_petunia,X) :- scare(X,dudley)```