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
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