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
Phantasy [73]
3 years ago
13

The code segment below uses the procedure IsPartOf (list, item), which returns true if item appears in list and returns false ot

herwise. The list newList is initially empty.FOR EACH item IN oldList{ IF (NOT IsPartOf (newList, item)) { APPEND (newList, item) }}Which of the following best describes the contents of newList after the code segment is executed?a. All elements in oldList which are repeated.b. All elements in oldList which are NOT repeated.c. All elements in oldList, including any repeats of elements.d. All unique elements in oldList NOT including any repeats of elements.
Computers and Technology
1 answer:
kakasveta [241]3 years ago
4 0

Answer:

Option d All unique elements in oldList NOT including any repeats of elements.

Explanation:

Given the function isPartOf() that will check if the input item is found in the input list.  Therefore if we run the following code segment

FOR EACH item IN oldList{

         IF (NOT IsPartOf (newList, item))

                 { APPEND (newList, item) }

}

the expression <em>NOT IsPartOf (newList, item) </em>will be evaluated to true if it encounter the first occurrence of a element and append the item to the newList. The repeat element will always be evaluated to False and therefore the repeat element won't be appended to the newList.

At the end, the newList will hold all the unique elements in oldList which doesn't include any repeats of elements.

You might be interested in
Data warehousing and data mining mean the same thing when applied to CRM
Nata [24]
This is false. Data warehousing is storing the data. Data mining is retrieving and analyzing data from the data warehouse.
5 0
3 years ago
Read 2 more answers
True or false: Quality score is an algorithm that scores each of your search ads on spelling and grammar.
andrew11 [14]
True or false: Quality score is an algorithm that scores each of your search ads on spelling and grammar.

Answer: False

I think sorry
4 0
2 years ago
What does lurch mean
o-na [289]

Answer:

lurch means make an abrupt, unsteady, uncontrolled movement or series of movements; stagger.

7 0
3 years ago
Read 2 more answers
Can someone please please please help me!
vova2212 [387]
Is that apologetics?

5 0
3 years ago
What is the exclusive legal right granted to all authors and artists that gives them sole ownership of their work to print, publ
Arisa [49]
The answer is copyright like for example if you copy and paste a essay offline and don’t give credit to the author it called copyright
7 0
2 years ago
Read 2 more answers
Other questions:
  • 8. A pattern of being late for work or for appointments is usually
    12·1 answer
  • WHAT DOES THE WORD MONOCHROME MEAN?
    11·1 answer
  • Which type of malware can hijack internal windows components and often goes undetected because it is already loaded when the ant
    14·1 answer
  • In fixed-width files, each record is on a separate line and the fields are separated by a special character.
    7·1 answer
  • Engineers and scientists redesign a prototype if it does not work correctly true or false and why
    10·2 answers
  • Mention two strategies of collecting data​
    13·1 answer
  • Edhesive Intro to cs quiz 2 q#9 <br><br> What is output? <br> Print (3 % 15)<br> Thanks!!
    8·1 answer
  • several ways that we commonly use technology today that people couldn't 10 years ago. Are these uses helpful or harmful to socie
    9·1 answer
  • Look at (c), is it accurate? ​
    9·2 answers
  • Which directory contains the initrd file? in suse linux
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!