Question: Write a Python program that creates a list containing ten random integers in the range 1 to 50. Then, create two additional lists: one

Write a Python program that creates a list containing ten random integers

Write a Python program that creates a list containing ten random integers in the range 1 to 50. Then, create two additional lists: one contains the non-duplicate values and the other one contains the duplicate values. Print the three lists. A sample run is given below: runfile('E:/COMP2101/src/lab10_ex7NoDuplicates.py", [26, 24, 3, 30, 6, 13, 11, 3, 40, 13] Non-Duplicate list: [26, 24, 3, 30, 6, 13, 11, 401 Duplicate list: [3, 13] In [129]: wdira E: /COMP2101/src") Original list: runfile('E:/COMP2101/src/1ab10_exMoOuplicates.py", In [130]: wdire E:/COMP2101/src") Original list: [24, 41, 7, 37, 5, 46, 50, 10, 19, 25] Non-Duplicate list: [24, 41, 7, 37, 5, 46, 50, 10, 19, 25] Duplicate list: [] In [131]: runfile('E:/COMP2101/src/lab10_ex7oDuplicates.py", [31, 4, 50, 26, 6, 28, 35, 31, 1, 38] [31, 4, 50, 26, 6, 28, 35, 1, 38] [31] wdirs'E:/COMP2101/src") Original list: Non-Duplicate list: Duplicate list:

Step by Step Solution

3.52 Rating (152 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Electrical Engineering Questions!