Question: the previous code is not working: % Facts shape ( conical ) . shape ( flat ) . shape ( bell _ shaped ) .

the previous code is not working: % Facts
shape(conical).
shape(flat).
shape(bell_shaped).
shape(convex).
edible(edible).
poisonous(poisonous).
size(small).
size(large).
size(medium).
color(white).
color(red).
color(brown).
color(yellow).
color(red_dotted_with_white).
% Rules
is_edible(Mushroom) :- size(Mushroom, small), color(Mushroom, white), shape(Mushroom, convex).
is_poisonous(Mushroom) :- size(Mushroom, large), color(Mushroom, red), shape(Mushroom, flat).
is_edible(Mushroom) :- size(Mushroom, medium), color(Mushroom, brown), shape(Mushroom, bell_shaped).
is_edible(Mushroom) :- size(Mushroom, small), color(Mushroom, yellow), shape(Mushroom, conical).
is_poisonous(Mushroom) :- size(Mushroom, large), color(Mushroom, brown), shape(Mushroom, convex).
is_poisonous(Mushroom) :- size(Mushroom, medium), color(Mushroom, red), shape(Mushroom, bell_shaped).
is_poisonous(Mushroom) :- size(Mushroom, small), color(Mushroom, brown), shape(Mushroom, conical).
is_edible(Mushroom) :- size(Mushroom, medium), color(Mushroom, yellow), shape(Mushroom, convex).
is_poisonous(Mushroom) :- color(Mushroom, red_dotted_with_white).
and it show this message error : Clauses of is_poisonous/1 are not together in the source-file
Earlier definition at line 22
Current predicate: is_edible/1
Use :- discontiguous is_poisonous/1. to suppress this message
procedure `size(A,B)' does not exist
Reachable from:
is_edible(A). i need sompne to solve this problem for me please ...

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!