Question: Python programming help, please. (a) Write a program that generates a list L of 50 random numbers between 1 and 100 (use this declaration at

Python programming help, please.

(a) Write a program that generates a list L of 50 random numbers between 1 and 100 (use this declaration at the top of your code: from random import randint).

(b) Given the above list L that contains random numbers between 1 and 100, create a new list whose first element is how many ones are in L, whose second element is how many twos are in L, etc. (c) Write a program that prints out the two largest and two smallest elements of the list L. (d) Write a program that replaces each element in a list L with its square.

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