Write a python code that will take a string as an input from the user where multiple numbers are separated by commas. Make a list of numbers using that string & print it. Then create a new list consisting only of the numbers which are greater than the average of the previous list. Print the two lists as shown and then if the average of all the elements in the new list is greater than the SECOND highest of the FIRST list then your program should print "It's a miracle!!!" otherwise your program should print "Just another normal day!!!"

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Sample Input 2:
10, 12,13, 3
Sample Output 2:
Input list: [10, 12, 13, 3]
Average of input list: 9.5
New list: [10, 12, 13]
6.
Average of the new list: 11.666666666666666
The 2nd highest number from the list1: 12
Just another normal day!!!
Explanation 2:
The average of the input list is 9.5. So the new list will contain numbers
greater than 9.5. The average of the new list is 11.667 which is NOT
greater than the second-highest of the first list 12. So, “Just another
normal day!!" is printed.
Transcribed Image Text:Sample Input 2: 10, 12,13, 3 Sample Output 2: Input list: [10, 12, 13, 3] Average of input list: 9.5 New list: [10, 12, 13] 6. Average of the new list: 11.666666666666666 The 2nd highest number from the list1: 12 Just another normal day!!! Explanation 2: The average of the input list is 9.5. So the new list will contain numbers greater than 9.5. The average of the new list is 11.667 which is NOT greater than the second-highest of the first list 12. So, “Just another normal day!!" is printed.
Question-1:
Write a python code that will take a string as an input from the user where
multiple numbers are separated by commas. Make a list of numbers using that
string & print it. Then create a new list consisting only of the numbers
which are greater than the average of the previous list. Print the two
lists as shown and then if the average of all the elements in the new list
is greater than the SECOND highest of the FIRST list then your program
should print "It's a miracle!!!" otherwise your program should print “Just
another normal day!!!"
Sample Input 1:
10, 12, 2, 17, 14
Sample Output 1:
Input list: [10, 12, 2, 17, 14]
Average of input list: 11.0
New list: [12, 17, 14]
Average of the new list: 14.333333333333334
The 2nd highest number from the list1: 14
It's a miracle!!!
Explanation 1:
The average of the input list is 11. So the new list will contain numbers
greater than 11. The average of the new list is 14.3333 which is greater
than the second-highest of the first list 14. So, “It's a miracle!!!" is
printed.
Transcribed Image Text:Question-1: Write a python code that will take a string as an input from the user where multiple numbers are separated by commas. Make a list of numbers using that string & print it. Then create a new list consisting only of the numbers which are greater than the average of the previous list. Print the two lists as shown and then if the average of all the elements in the new list is greater than the SECOND highest of the FIRST list then your program should print "It's a miracle!!!" otherwise your program should print “Just another normal day!!!" Sample Input 1: 10, 12, 2, 17, 14 Sample Output 1: Input list: [10, 12, 2, 17, 14] Average of input list: 11.0 New list: [12, 17, 14] Average of the new list: 14.333333333333334 The 2nd highest number from the list1: 14 It's a miracle!!! Explanation 1: The average of the input list is 11. So the new list will contain numbers greater than 11. The average of the new list is 14.3333 which is greater than the second-highest of the first list 14. So, “It's a miracle!!!" is printed.
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY