Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. lauraberishaj

    How to write these predicates

    Hi, Thanx a lot, I almost did most of them. Can you help me with these: 4. siblings(A,B): A and B are siblings (both parents in common) 9. ancestor(F,CS,N): F is the ancestor of the people in the list CS and N is the length of CS.
  2. lauraberishaj

    How to write these predicates

    Hi everybody I have a problem! I have a file of prolog which I need to extend with some code. ---------------------------------- woman(anna). woman(mia). woman(eva). woman(maja). woman(nora). woman(kim). woman(elfrida). woman(ana). man(john). man(peter). man(erik). man(ben). man(ed)...
  3. lauraberishaj

    Calculate the sum of a list of lists

    sum([], 0) :- !. sum(N, N) :- number(N), !. sum([H|T], N) :- sum(H, N1), sum(T, N2), N is N1 + N2. --Did it ..yeeeaaahhhh
  4. lauraberishaj

    Calculate the sum of a list of lists

    I'm new in Prolog, Can anybody help me how to calculate the sum of a list of lists? Thank You, Laura

Part and Inventory Search

Back
Top