1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Stells [14]
4 years ago
10

(2-2) In relatives.pl file, write and add the following rule. ancestor(X, Y) : X is an ancestor of Y Run ancestor(brown, X). Sub

mit all generated result for X by running your program. (2-3) In relatives.pl file, write and add the following rule. descendent(X,Y): X is a descendent of Y Run descendent(david, X). Submit all generated result for X by running your program. (2-4) In relatives.pl file, write and add the following rules. fatherinlaw(X,Y): X is a fatherinlaw of Y Run fatherinlaw(X, Y). Submit all generated result for X and Y by running your program. (2-5) In relatives.pl file, write and add the following rules. niece(X,Y): X is a niece of Y Run niece(X, Y). Submit all generated result for X and Y by running your program. If you need an operation not, use the operator "not" ( \== ), like X\==Y.
Computers and Technology
1 answer:
alukav5142 [94]4 years ago
4 0

Answer:

Check the explanation

Explanation:

relatives.pl

/* Facts */

male(ace).

male(john).

male(jack).

male(bill).

male(david).

male(brown).

male(daniel).

female(cecil).

female(aba).

female(cathy).

parent(john,ace)

parent(tom,john)

parent(jack,john)

parent(bill,aba)

parent(brown,aba)

parent(cecil,bill)

parent(david,cecil)

parent(cathy,brown)

parent(daniel,cathy)

parent(ellen,daniel)

/* parent(X,Y) -> Y is parent of X */

wife(ceceil,jack) /* wife(X,Y) -> Y is wife of X */

Answer of 2-2

Considering all facts and rules answer will be daniel,ellen.

Answer 2-3

Considering all facts and rules answer will be bill.

Answer 2-4

Considering all facts and rules X will be john and y will be cecil.

Answer 2-5

Considering all facts and rules X will be tom and y will be david.

You might be interested in
Write a for loop that will print the values 1 to 20 while skipping the odd numbers (2,4,6,8,10,12,14,16,18,20):
DochEvi [55]

<u>Answer:</u>

<em>void main ( )  </em>

<em> {  </em>

<em> int counter;  </em>

<em>  cout<<""Even numbers between 1 to 20 are:""<<endl ;  </em>

<em> //Method 1 </em>

<em>  for (counter = 1; counter <= 20; counter++)  </em>

<em>  {  </em>

<em>    if ( counter%2 == 0)  </em>

<em>   {   </em>

<em>     cout<<counter<<""\t""<<endl ;  </em>

<em>   }  </em>

<em>  }  </em>

<em>//Method 2 – simplest one </em>

<em>for (counter = 2; counter <= 20;)  </em>

<em>  {  </em>

<em>     cout<<counter<<""\t""<<endl ;  </em>

<em>counter = counter + 2; </em>

<em>    </em>

<em>  } </em>

<em> </em>

<em>  return 0;  </em>

<em>} </em>

<u>Explanation:</u>

In this, Method 1 runs a for loop and check whether each number is divided by 2. If yes, then printed otherwise it is skipped.

In the second method, it runs for loop only for even numbers. <em>This is obtained by incrementing the counter by 2. </em>

6 0
3 years ago
Create a recursive procedure named (accumulator oddsum next). The procedure will return the sum of the odd numbers entered from
maks197457 [2]

Answer:

Explanation:

The following procedure is written in Python. It takes the next argument, checks if it is an odd number and if so it adds it to oddsum. Then it asks the user for a new number from the keyboard and calls the accumulator procedure/function again using that number. If any even number is passed the function terminates and returns the value of oddsum.

def accumulator(next, oddsum = 0):

   if (next % 2) != 0:

       oddsum += next

       newNext = int(input("Enter new number: "))

       return accumulator(newNext, oddsum)

   else:

       return oddsum

8 0
3 years ago
In a cellular network each cell is controlled by A tower what are theSe towers called?
Alex787 [66]

Answer: Base Stations

Base Stations are responsible for receiving and transmitting signals in a cellular network. These stations are equipped with an antenna or multiple antennas that allow the users to send and receive the calls and texts they send with their cellular phones.

Depending on the size and the range that a base station can reach, these are often stationed in multiple areas to allow cellular signals to constantly be connected to the cellular networks of the different service providers. Without these stations the customers of the providers will not have a signal to send or receive texts or calls.

7 0
4 years ago
Read 2 more answers
________(fill in the blank) in online education refer(s) to how fairly the particular needs of particular groups of students are
STatiana [176]

Answer:

Accessability

Explanation:

6 0
3 years ago
What’s my password for this app
FrozenT [24]

Answer:

I guess there isnt any password!

Explanation:

7 0
4 years ago
Read 2 more answers
Other questions:
  • Which is the output of the formula =AND(12&gt;6;6&gt;3;3&gt;9)
    6·1 answer
  • Suppose you have an int variable called number. What Java expression produces the second-to-last digit of the number (the 10s pl
    13·1 answer
  • Emily wants to search online for cakes containing nuts. However, she wants to skip cakes that have raisins in them. Which option
    9·1 answer
  • Jackson builders is constructing new homes in the Parkway subdivision.The company needs the logic for an application that ncalls
    13·1 answer
  • Can any existing directory beneath the system root directory be used as a mount point?
    9·1 answer
  • Describe two ways the ARPANET is different from the internet
    12·1 answer
  • The product of two integers is -180 if one of them is 12 find the other​
    14·1 answer
  • Have you ever tried to learn a new language or do you have friends who've had that experience? What are some of the steps you wo
    10·2 answers
  • OSI layer for HDLC??​
    13·1 answer
  • Of the following hard drives, which one is fastest?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!