Slide 14.15: Simple facts Slide 14.17: Facts with arguments Home |
?- john_Forgot_His_Raincoat.The first two queries succeed since they can be matched against facts in the database in the previous slide. However,
yes
?- raining.
yes
?- foggy.
no
foggy
fails (since it cannot be matches) and Prolog answers no
since we have not told it this fact.
Simple Fact Exercise II
Given the database below, study the queries below it.
blue_box. red_box. green_circle. blue_circle. orange_triangle.