0

Please help me, Array Dimensi 1

Make the source code of the program where the program will receive N numbers and then it will display numbers that appear more than once in the set of numbers.

10th Nov 2018, 1:27 PM
Dinda Ayu
Dinda Ayu - avatar
2 odpowiedzi
+ 4
This snippet stores duplicate values from a list in another one, to be printed later, I will leave the input part for you to implement. numbers = [1,9,7,0,2,10,5,0,5,6,4,1,3,7,8,2] dups = [] for number in numbers: if numbers.count(number) > 1 and number not in dups: dups.append(number) print(dups)
10th Nov 2018, 3:18 PM
Ipang
+ 1
Where is your try? If you have problem in your code, show us and we will definitely help you out.😃 https://www.sololearn.com/discuss/1316935/?ref=app
10th Nov 2018, 1:36 PM
Roneel
Roneel - avatar