Computers and Technology

Programming Objectives
With two given lists, such as [1,3,6,78,35,55] and [12,24,35,24,88,120,155], write a program to make a list whose elements are intersection (common) of the above given lists. Please note that redundant elements should be counted only once.
Technical Descriptions
Your program should interact with its user such that two lists of different number of elements can be arbitrarily specified through program input.
With the lists above as an example:
Please specify the number of elements in the first list:
6
Please specify the number of elements in the second list:
7
Input element 1 of list 1:
1
Input element 2 of list 1:
3
Input element 3 of list 1:
6
Input element 4 of list 1:
78
Input element 5 of list 1:
35
Input element 6 of list 1:
55
Input element 1 of list 2:
12
Input element 2 of list 2:
24
Input element 3 of list 2:
35
Input element 4 of list 2:
24
Input element 5 of list 2:
88
Input element 6 of list 2:
120
Input element 7 of list 2:
155
The expected output should be
Language: Python

answer
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 15:40, lmirandanvmi
Establish which of the following statements are true. (a) a sequence is convergent if and only if all of its subsequences are convergent. (b) a sequence is bounded if and only if all of its subsequences are bounded. (c) a sequence is monotonic if and only if all of its subsequences are monotonic.
Answers: 2
image
Computers and Technology, 22.06.2019 15:00, nika0001
When designing content as part of your content marketing strategy, what does the "think" stage represent in the "see, think, do, care" framework?
Answers: 3
image
Computers and Technology, 23.06.2019 11:00, danielcano12281621
Sports and entertainment class, your goal is to increase attendance and make a profit for a game by getting your team on a winning track with total salaries less than $3,000,000
Answers: 3
image
Computers and Technology, 23.06.2019 12:00, trippie4life
3. when you right-click a linked spreadsheet object, what commands do you choose to activate the excel features? a. linked worksheet object > edit b. edit data > edit data c. linked spreadsheet > edit d. object > edit data
Answers: 2
Do you know the correct answer?
Programming Objectives
With two given lists, such as [1,3,6,78,35,55] and [12,24,35,24,88,120,...

Questions in other subjects:

Konu
Geography, 02.09.2019 17:00
Konu
Biology, 02.09.2019 17:00