Question 3(c)(i) 2014 · May-June · Paper 32 · 1 mark
Reveal official mark-scheme answer
Official answer for Question 3
Part (c)
(i)
Part (c)
(i)
Show text version of question
Question 3
Part (c)
(i)
Question 3
A football club runs four teams for boys and girls and stores the following data:
- players
- team names
- the upper age limit for each team
- the gender of each team.
The following facts are stored in a knowledge base to be used by a logic program.
Age is stored rather than date of birth to simplify the programming.
team(juniorFemale). team(juniorMale). team(femaleU16). team(maleU16). ageLimit(juniorFemale, 11). ageLimit(juniorMale, 11). ageLimit(femaleU16, 15). ageLimit(maleU16, 15). teamGender(juniorFemale, f). teamGender(juniorMale, m). teamGender(femaleU16, f). teamGender(maleU16, m). player(bill, m, 16). player(moira, f, 13). player(imram,f, 14). player(jajid, f, 15). player(wasim1, m, 14). player(wasim2, m, 10). player(sarah, f, 11). player(paul, m, 13). player(neville, m, 12). player(lewis, m, 14). player(sajid, f, 15). The following rule is added to the knowledge base:
eligiblePlayer(PlayerX, TeamY) if player(PlayerX, GenderX, AgeX) and teamGender(TeamY, GenderY) and GenderX=GenderY.
(i)
Describe what this rule is designed to do.
Why this question appears here
71% assigned-topic match · Programming › Constructs
Topic-match percentages estimate how closely each question fits the selected syllabus topic. They are a guide for choosing stricter or broader practice.
Permanent source page: Educate A Change · From 9691_s14_qp_32.pdf
