Advertisement
Guest User

Untitled

a guest
Dec 13th, 2019
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Prolog 0.73 KB | None | 0 0
  1.  
  2. % Check for compliance with football
  3. football(X) :- prefers_group(X), goes_for_the_win(X), not_limited(X), likes_ball_sports(X).
  4.  
  5. % Do the same for indoor and outdoor football
  6. indoor_football(X) :- football(X), prefers_indoor(X).
  7. outdoor_football(X) :- football(X), prefers_outdoor(X).
  8.  
  9. % Check for suitability with Cardio
  10. cardio(X) :- lack_of_time(X), wants_to_stay_active(X), prefers_solo(X), goes_for_fun(X).
  11.  
  12. % Check for suitability with Cycling
  13. cycling(X) :- cardio(X), prefers_outdoor(X), not_limited(X).
  14.  
  15. % Check for suitability with Golf
  16. golf(X) :- goes_for_fun(X), prefers_outdoor(X), prefers_solo(X), limited(X).
  17.  
  18. % Check for suitability with aerobics
  19. aerobics(X) :- prefers_indoor(X), limited(X), prefers_group(X).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement