Roxanne A.
asked 12/29/22Help would appreciated. I didnt understand how to start.An outline would be great and an easy explanation.
Your task is to create a Python program that creates a list of 1,000 random integers and then provides the user with some descriptive statistical information about the list. This is an exercise in working with lists, working with random numbers, and doing some simple numerical analysis of a list of numbers.
Write and submit a program that does the following:
- Create an empty Python list
- Create a count-controlled while loop to generate and append 1,000 random integers to the list. Each integer should be between 1 and 100, including 1 and 100.
- Lesson 4.4, starting on page 12 in Chapter 4, describes generating random numbers in Python.
- Use the for statement to iterate the list, and calculate and print:
- the sum of the values in the list.
- the minimum of the values in the list.
- the maximum of the values in the list.
- the average of the values in the list.
Your software should not use the Python Max or Min functions for lists. You should be able to write your own code to iterate the list and find the maximum and minimum values.
Before the loop starts, set the maximum to a number lower than anything in the list. As you iterate the list, if the current list value is higher than the maximum, it becomes the new maximum. When the loop is done, maximum will be the highest value.
Before the loop starts, set the minimum to a number higher than anything in the list. As you iterate the list, if the current list value is lower than the minimum, it becomes the new minimum. When the loop is done, minimum will be the lowest value.
Before the loop starts, set the sum to a zero. As you iterate the list, add the current value to the sum. The sum will be like a "running total" as the loop progresses. When the loop is done, sum will be sum of all numbers in the list..
You should be able to do get the maximum, minimum, and sum with a single loop, followed by a statement to find the average, and then print statements to show the results. The statement to find the average should use the list length function, not the number 1,000, which means it should work no matter how many numbers are in the list.
1 Expert Answer

Edward F. answered 12/29/22
Always Happy to Help
I made some comments in the code here; please let me know if everything makes sense. Note that the way your assignment asks you to complete the tasks is not the optimal way; in practice you should always use the built-in functions to perform a task as they are designed by professionals and thus much more robust.
Roxanne A.
Thank you so much!! (: I tried doing something similar along the lines. I get the idea now. Some of the functions you use are a little complicated and professional😄...its very organized though! (:01/02/23
Roxanne A.
Also I tried to run the program but it comes out empty01/02/23

Edward F.
Works just fine for me… https://onlinegdb.com/4bQLNT2P-01/03/23
Still looking for help? Get the right answer, fast.
Get a free answer to a quick problem.
Most questions answered within 4 hours.
OR
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.
Judy R.
Hello I am 22 years experienced Online Tutor and Assignment Helper for Computer Science and Math. I have been teaching IT Professionals, students from different grades, and Graduate and Post Graduate students for more than 22 years. I am ready to help you with your learning requirements, assignments, tests, and projects. For further discussion about the assignment or project help you need, please add me on skype and my skype id is nettuitions Thanks01/22/23