Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Excel As Your Database

Authors: Paul Cornell

1st Edition

1590597516, 978-1590597514

More Books

Students also viewed these Databases questions