Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a Python program, list_info.py, that takes a list of positive integers (separated by commas) as input and prints out: 1. The list L, ordered.
Write a Python program, list_info.py, that takes a list of positive integers (separated by commas) as input and prints out: 1. The list L, ordered. 2. An ordered list of unique numbers from L (the list L after duplicates have been removed). 3. The average of the numbers in L. The average should be printed with two digits after the decimal point. 4. An ordered list of numbers from L which are greater than the average. 5. An ordered list of numbers from L which are greater than the average + 2 6. The most frequent number from Land its frequency, if the user wants this information. If more than one number has the highest frequency then the one appearing first en the input list should be printed. You are allowed to use list functions, but you are NOT allowed to import any module. Enter integers separated with commas: 2,5,7,2,8,10,34,23,9,4,5 The numbers: [2, 2, 4, 5, 5, 7, 8, 9, 10, 23, 34] Unique numbers: [2, 4, 5, 7, 8, 9, 10, 23, 34] Average number: 9.91 Numbers > average: [10, 23, 34] Numbers > average + 2: [23, 34) Frequency info? (y): n
Step by Step Solution
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