Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started