Prolog Predicates Flashcards

1
Q

length(X,2), append(_,X,[a,b,c,d,e]).

A

X = [d,e].

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

X > 2, member(X, [1,2,3,4,5]).

A

Instantiation error

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

member(X, [1,2,3,4,5]), X > 2

A

X = 3 ; X = 4 ; X = 5.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

member(X, [1,2,3,4]), member(X, [2,4]).

A

X = 2 ; X = 4.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly