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
Help me code plz i using python language on laptop please answer or comment if u want to help
dybincka [34]

Answer:

What is the question you have?

Explanation:

7 0
2 years ago
paula needs to ensure that an animation she has created is repeated. which option should she use to achieve this ?
Masteriza [31]

Answer:

transitions tab

Explanation:

please mark brainliest

4 0
3 years ago
Which elements are visible when a user opens a new PowerPoint presentation?
Mariulka [41]

Answer:

The only element visible is the presentation itself.

Explanation:

All of the other options, such as presenter's assistance, is hidden away from the projector, presentation device, etc. You are the only one that can see the window that shows what slide is next, presenter's notes, etc. <u>In other words, whatever you want the audience to see, that is only what they will see and nothing else.</u>

3 0
3 years ago
Read 2 more answers
What is the answer ????​
wel

where is the question ????

Happy choti Diwali

3 0
3 years ago
Read 2 more answers
What isthe concept of packets, give example?
Oduvanchick [21]

Answer: Packets are the small unit of data that is sent from source to destination on a network.

Explanation: Packets are small packages that carry data in a packet form and is used from transferring it on internet or any kind of packet-switched network. They use the internet protocol (IP) for the transmission of data.

Example: packet radio is a sort of digital radio that uses the packet for transmission of data to other nodes by utilizing the AX-25 protocol.

6 0
3 years ago
Other questions:
  • A user complains that he cannot access a particular website, although he is able to access other websites. at which layer of the
    5·1 answer
  • If you are trying move a hard drive from a non-working computer to a working computer for the purposes of accessing the data on
    5·1 answer
  • What are some programs that you have used that have condition-controlled loops and count-controlled loops?
    10·1 answer
  • Time Conversion C++: Given a time in -hour AM/PM format, convert it to military (24-hour) time.
    9·1 answer
  • True or false? LearnSmart (the "smart flash card assignments") really gets your competitive spirit in gear by allowing you to se
    8·1 answer
  • . Write the advantages and disadvantages of CLI?
    14·2 answers
  • Which types of file formats are the best choice for files that may need to be edited later?
    14·1 answer
  • Which statement correctly differentiates how to use list and table styles?
    12·2 answers
  • A__ is a part of a GUI that allows a specific type of interaction with the user.
    14·1 answer
  • What are some industries of aerodynamics and hydrodynamics? explain each one in detail.
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!