Back | Reverse | Quick Reply | Post Reply |

Prolog
Link | by Mushy on 2008-02-28 10:50:18
Hi!

Does anyone know how to write prolog? I have to do some and I'm nearly done! But the last question has me so confused! And if anyone could help I'd be so happy!

I have some details on the oscars. I have two years, 2000 and 1981 and details on best actor, actress, best picture and directing.

awards(73, 2000).
awards(54, 1981).

actor('Javier Bardem', 'Before Night Falls', 2000, lose).
actor('Russell Crowe', 'Gladiator', 2000, win).

Looks a little like that but there's more than that.

And the question is:

Write a rule with three arguments. Calls to this rule should succeed with one argument a year, another a list of categories and the third a list corresponding to the winner of each category. (You can think of the third argument as returning the answers.)

It has to be in tomorrow so I'm getting a little desperate T_T Any help would be greatly appreciated!

Thanks a bunch!

Back | Reverse | Quick Reply | Post Reply |

Copyright 2000-2024 Gendou | Terms of Use | Page loaded in 0.0022 seconds at 2024-12-28 19:59:06