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
The reader can tell from the Article that __________.
Dmitry_Shevchenko [17]

Answer:

D. NASA would have preferred that the process for making trajectory calculations during the 1930s and 1940s had not been brought to light.

7 0
3 years ago
Im sad cheer me up please
SSSSS [86.1K]

Answer:

Don't worry !! Everything will be fine

Explanation:

5 0
3 years ago
Read 2 more answers
Which type of attack is one in which a rogue wireless access point poses as a legitimate wireless service provider to intercept
il63 [147K]
Answer: An evil twin attack poses as a legitimate AP.<span />
7 0
3 years ago
Which graph or chart shows changes in the value of data?
yKpoI14uk [10]

Answer:

Bar graph and Pie chart

3 0
3 years ago
Read 2 more answers
By incorporating video games into classwork, teachers would help students become more confident decision makers.
dangina [55]

teachers would help students become more confident decision makers.

7 0
4 years ago
Read 2 more answers
Other questions:
  • Upon combustion a .8009 g sample of a compound containing only carbon hydrogen and oxygen produced 1.6004 g of CO2 and .6551 g o
    10·1 answer
  • Annalise received financial aid offers from two universities. Financial Analysis for Option A Costs per Year Financial Aid Packa
    8·2 answers
  • Limitations of the information systems used by tesco​
    7·1 answer
  • How have productivity programs improved the professional lives of people? (check all that apply)
    8·2 answers
  • In this lab, you will build a system for package delivery services that provides different shipping options with specific price.
    6·1 answer
  • What does the CFO of a company do
    14·1 answer
  • Explain two ways that you can create a header.
    14·1 answer
  • a _____ is a telecommunications network that connects users and their computers in a geographical area that spans a campus or a
    14·1 answer
  • Which type of a computer can be assembled using a monitor, a keyboard, a cpu, speakers, a printer and a mouse?.
    14·1 answer
  • A hydraulic lift has a mechanical advantage of 5. If the load weighs 350 N, what effort is required to lift the weight? Provide
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!