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]
2 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]2 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
Angela recently purchased a new Android smartphone. While purchasing the phone, Angela was told that she would need to set up a
vagabundo [1.1K]

Answer:

G m a i l

Explanation:

G m a i l by Google is the main commercial email provider to Android Phones. This is because it offers so many features that other email provider do not. One of this is the ability to backup your data, including contacts, messages, and others. This features along with other features makes Google g m a i l account the best option for Android users.

8 0
3 years ago
How are modern computers different from eniac?
Natalka [10]
Modern computers use in side a memory board to store info but back then you would use flappy disks   
8 0
2 years ago
A method signature for a method consists of all elements of the method except the body. That is, a method signature consists of
Bess [88]
To be honest I feel like it’s B that’s looks and seems the most correct to me
8 0
2 years ago
Feedback is one of the basic elements games have in common<br><br> True<br> False
mixas84 [53]
True because odds of finds any game with no feedback is unheard of
7 0
2 years ago
Read 2 more answers
Which of the following does Not impact your credit score?
aleksandr82 [10.1K]

Answer:your race, gender, marital status, education level, religion, political party or income, those details can't be factored into your credit scores.

Explanation:

3 0
3 years ago
Other questions:
  • This program will output a right triangle based on user specified height triangle_height and symbol triangle_char. (1) The given
    9·1 answer
  • Which of the following tasks would a database administrator perform ? A identify computer security photos, B. Make sure protocol
    15·1 answer
  • Know when the double, int, String, and char data types are best used. Example: I would store a social security number in a strin
    7·1 answer
  • A research team is studying parallel computing. They want to run parallel processes without having to use multiple processors. H
    15·2 answers
  • Design a hierarchy c hart or flowchart for a program that calculates the current balance in a savin gs account. The program must
    8·1 answer
  • What would be used by a business to assess how the business is working within its organization goals? O A. Information systems B
    8·1 answer
  • Why is 0.3333333333333333 the output of print(1/6 + 1/6) in python?
    8·1 answer
  • write the definition of a class clock. the class has no constructors and one instance variable of type int called hours.
    12·1 answer
  • A menu that appears when an object is clicked with the right mouse button is called a tool-tip help menu
    10·1 answer
  • Consider the following implementation of a search method:
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!