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
abruzzese [7]
3 years ago
7

Complete the second clause of the following Prolog program for member/2 where member(X, Y) checks whether X is an element (a mem

ber) of a list Y. member(X,[X|R]). member(X,[Y|R]) :- ____________.A. member(X,R).
B. member(X,Y).
C. member(_,R).
D. member(Y,R).
E. member(X,Y).
Computers and Technology
1 answer:
Nadusha1986 [10]3 years ago
4 0

Answer:

The answer is "Option A"

Explanation:

In the given program code, two-member "X, Y" is used, in which X is an element of the list and Y is the list. In this another variable R declares, that store a number for the match, in this question choice "A" is correct because it uses an element and variable "R" for check and wrong choices can be described as follows:

  • In option B, in this two-parameter is used, in which one is an element and one is the list, that's why it is incorrect.
  • In option C, It is wrong because there is no underscore variable.
  • Option D and Option E both were wrong because in this list is passed as the parameter.
You might be interested in
Write the function setKthDigit(n, k, d) that takes three integers -- n, k, and d -- where n is a possibly-negative int, k is a n
liq [111]

Answer:

Explanation:

Let's do this in Python, first we need to convert the number into string in order to break it into a list of character, then we can replace the kth character with d. Finally we join all characters together, convert it to integer then output it

def setKthDigit(n, k, d):

n_string = str(n)

d_char = str(d)

n_char = [c for c in n_string]

n_char[k] = d_char

new_n_string = ''.join(n_char)

return int(new_n_string)

6 0
4 years ago
Sally thought of adding a new paragraph after the
hram777 [196]

Answer:

1) press the enter key

2) start typing the new paragraph

Explanation:

did it on edg

7 0
4 years ago
The Learning Journal is a tool for self-reflection on the learning process. The Learning Journal will be assessed by your instru
eimsori [14]
Any song recommendations u got for me? Thanks for the points!!!!
5 0
3 years ago
Declare a variable named
zlopas [31]

The declared variable name populationChange suitable for holding numbers like  -593142 and 8930522 is as follows:

populationChange = -593142

populationChange = 8930522

<h3>Variable:</h3>

Variable are containers use for storing values of different datatypes. Python variable can be use to store various datatype without indicating the datatype. The variable can be used to store float, string, integer etc.

For example

myVariable = 345

The variable named populationChange that holds numbers like -593142 and 8930522 can be declared as follows;

populationChange = -593142

populationChange = 8930522

Note the code is written in python

learn more on python variable here: brainly.com/question/21335728

3 0
2 years ago
Your employer is opening a new location, and the IT director has assigned you the task of calculating the subnet numbers for the
astraxan [27]

Answer:

Check the explanation

Explanation:

• We are taking a look at the class B network beginning with 172.0.0.0.0,while Converting this value to binary as:10101100.00010100.00000000.00000000.  32 bits in total, out of this the First 16 bits that are used as network ID and the subsequent 16 bits are used as HostID.Out of the 16 bits that are sued for Network ID the 2 bits namely Bits fifteen and sixteen (15 and 16) have been set and can't be changed and hence only 14 bits are used as network ID.

• Now so that we can divide this network into 50 subnets for class B network we will have to borrow a bit as shown below:

• 10101100.00010100.00000000.00000000=172.0.0.0.0,Adding 1 bit by borrowing from host portion and adding it to network ID will give it 10101100.00010100.00000000.00000000(0 shown in bold) or10101100.00010100.10000000.00000000 (1 shown in bold) will give us 2 unique subnets.i.e changing 1 bit will give us 2 power 1=2 subnets,thus changing 2 bits will give us 2 power 2 subnets =4 similarly changing 6 bits will give us 64 unique subnets.

• Which means and going by the above problem statement in case we need 50 subnets and we also need to change 6 bits in the Network ID to give 50 unique subnets.

• Thus the answer is 6

3 0
4 years ago
Other questions:
  • When using Internet explore what options will empty the log of Internet sites you have recently viewed
    6·1 answer
  • Code a Boolean expression that tests if a decimal variable named currentSales is greater than or equal to 1000 or a Boolean vari
    11·1 answer
  • What are the Java counterpart to UML attributes.
    6·1 answer
  • What is a graphical representation of a real person in a virtual community called?
    5·1 answer
  • In 1971, Intel created and marketed the first microprocessor chip, called the Intel 4004. What was significant about this invent
    7·1 answer
  • The thinner the thread on the screw, the ______the force needed but the _____the distance.
    15·1 answer
  • When a binary tree is full to its next to last level and its leaves on the last level are filled from left to right the tree is
    14·1 answer
  • The Excel application is used to create
    7·1 answer
  • Write a function named count_vowels that accepts two arguments: a string and an empty dictionary. The function should count the
    10·1 answer
  • there are n houses in a row numbered from 1 to n. an array infected houses contains the houses the houses which are infected wit
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!