Question: Write a Python program that accepts a list of numbers from the user and performs the following:Input Validation: Use a while loop to ensure the

Write a Python program that accepts a list of numbers from the user and performs the following:Input Validation: Use a while loop to ensure the user enters valid numbers (e.g., no letters or empty inputs).Analysis with Loops:Calculate and display the sum of all numbers.Find and display the largest and smallest numbers in the list.Count how many numbers are even and how many are odd.Allow the user to repeat the analysis with a new list without restarting the program (using a while True loop).Output Example: Enter a number (or type 'done' to finish): 12 Enter a number (or type 'done' to finish): 7 Enter a number (or type 'done' to finish): 23 Enter a number (or type 'done' to finish): done Total sum: 42 Largest number: 23 Smallest number: 7 Even numbers: 1 Odd numbers: 2 Do you want to repeat (Y/N)?: N

Step by Step Solution

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 Programming Questions!