subject

Consider two lists of numbers called list1 and list2. A programmer wants to determine how many different values appear in both lists. For example, if list1 contains [10, 10, 20, 30, 40, 50, 60] and list2 contains [20, 20, 40, 60, 80], then there are three different values that appear in both lists (20, 40, and 60).
The programmer has the following procedures available.
Procedure Call Explanation
Combine (myList1, myList2) This procedure creates a new list containing the elements from myList1 followed by the entries from myList2. The resulting
list is returned. For example, if myList1 contains [2, 4, 6] and
myList2 contains [1, 5], the procedure will return the list
[2, 4, 6, 1, 5].
RemoveAllDups (myList) This procedure creates a new list containing the elements of myList with any duplicate values removed. The resulting list is returned. For
example, if myList contains [3, 2, 4, 2, 2, 5, 6, 4],
the procedure will return the list [3, 2, 4, 5, 6].
Which of the following can be used to assign the intended value to count ?
answer choices
bothList ← Combine (list1, list2)
uniqueList ← RemoveAllDups (bothList)
count ← LENGTH (bothList) - LENGTH (uniqueList)
newList1 ← RemoveAllDups (list1)
newList2 ← RemoveAllDups (list2)
bothList ← Combine (newList1, newList2)
count ← LENGTH (list1) + LENGTH (list2) - LENGTH (bothList)
newList1 ← RemoveAllDups (list1)
newList2 ← RemoveAllDups (list2)
bothList ← Combine (newList1, newList2)
count ← LENGTH (newList1) + LENGTH (newList2) - LENGTH (bothList)
newList1 ← RemoveAllDups (list1)
newList2 ← RemoveAllDups (list2)
bothList ← Combine (newList1, newList2)
uniqueList ← RemoveAllDups (bothList)
count ← LENGTH (bothList) - LENGTH (uniqueList)

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:30
Imagine that you have a friend who is starting a small business and is interested in using social media to spread the word. he is not certain that it is a good move, and has come to you for . would you advise him to use social media to advertise his business? why or why not? support you answer with information from the text.
Answers: 1
question
Computers and Technology, 22.06.2019 11:10
The total cost of textbooks for the term was collected from 36 students. create a histogram for this data. $140 $160 $160 $165 $180 $220 $235 $240 $250 $260 $280 $285 $285 $285 $290 $300 $300 $305 $310 $310 $315 $315 $320 $320 $330 $340 $345 $350 $355 $360 $360 $380 $395 $420 $460 $460
Answers: 2
question
Computers and Technology, 22.06.2019 17:30
Working on this program in python 3.7: a year in the modern gregorian calendar consists of 365 days. in reality, the earth takes longer to rotate around the sun. to account for the difference in time, every 4 years, a leap year takes place. a leap year is when a year has 366 days: an extra day, february 29th. the requirements for a given year to be a leap year are: 1) the year must be divisible by 42) if the year is a century year (1700, 1800, the year must be evenly divisible by 400some example leap years are 1600, 1712, and 2016.write a program that takes in a year and determines whether that year is a leap year.ex: if the input is 1712, the output is: 1712 is a leap year. ex: if the input is 1913, the output is: 1913 is not a leap year. your program must define and call the function isleapyear(useryear). the function should return true if the input year is a leap year and false otherwise.
Answers: 1
question
Computers and Technology, 22.06.2019 21:00
So im doing this school challenge and the teachers said whats the average text a student gets a day so i need to get about 20 in a day but dont know how can you guys 2163371293
Answers: 2
You know the right answer?
Consider two lists of numbers called list1 and list2. A programmer wants to determine how many diffe...
Questions
question
Mathematics, 29.11.2019 17:31
question
Biology, 29.11.2019 17:31
question
Mathematics, 29.11.2019 17:31
Questions on the website: 13722362