? users online
  • Logout
    • Open hangout
    • Open chat for current file
<div class="notebook open-fullscreen">

<div class="nb-cell markdown" name="md3">
## is_vocab/1
</div>

<div class="nb-cell markdown" name="md1">
Suche dir aus den folgenden vier Notationen eines Vokabulars eine aus und schreibe das dazu passende Prädikat `is_vocab/1`.
</div>

<div class="nb-cell markdown" name="md2">
Danach kannst du deinen Code testen, indem du die zugehörige Anfrage an dein Programm stellst.
</div>

<div class="nb-cell program" data-background="true" name="p1">
% Prolog representation of a vocabulary (1)
% is_vocab1([[love,2], [hate,2], [customer,1], [vincent,0], [honey_bunny,0]]).

% Implementiere hier das Prädikat is_vocab1
</div>

<div class="nb-cell program" data-background="true" name="p2">
% Prolog representation of a vocabulary (2)
% is_vocab2([(love,2), (hate,2), (customer,1), (vincent,0), (honey_bunny,0)]).

% Implementiere hier das Prädikat is_vocab2
</div>

<div class="nb-cell program" data-background="true" name="p3">
% Prolog representation of a vocabulary (3)
% is_vocab3([relation(love,2), relation(robber,1), constant(vincent), constant(mia)]).

% Implementiere hier das Prädikat is_vocab3
</div>

<div class="nb-cell program" data-background="true" name="p4">
% Prolog representation of a vocabulary (4)
% is_vocab4([relation(love,2), relation(sad,1), constant(butch,0), constant(mia,0)]).

% Implementiere hier das Prädikat is_vocab4
</div>

<div class="nb-cell markdown" name="md4">
### Testen der Lösung
</div>

<div class="nb-cell query" name="q1">
% Anfrage zu is_vocab1 
is_vocab1([[love,2], [hate,2], [customer,1], [vincent,0], [honey_bunny,0]]).
</div>

<div class="nb-cell query" name="q2">
% Anfrage zu is_vocab2
is_vocab2([(love,2), (hate,2), (customer,1), (vincent,0), (honey_bunny,0)]).
</div>

<div class="nb-cell query" name="q3">
% Anfrage zu is_vocab3
is_vocab3([relation(love,2), relation(robber,1), constant(vincent), constant(mia)]).
</div>

<div class="nb-cell query" name="q4">
% Anfrage zu is_vocab4
is_vocab4([relation(love,2), relation(sad,1), constant(butch,0), constant(mia,0)]).
</div>

</div>