Question: Write a Python program that will perform the following sequence of the operations : A . Using random number generator, create 2 Lists ( List

Write a Python program that will perform the following sequence of the
operations :
A. Using random number generator, create 2 Lists ( List_1 and
List_2). List_1 consist of 10 random integer numbers that
are between 1-5 inclusive . List_2 consist of 10 random
integer numbers that are between 1620 inclusive. Display
List_1 followed by List_2 in 2 separate lines.
B. Create new list ( List_3) that contain all elements of List_1
and elements of List_2. Display List_3.
List_3 is created according to the following rules :
Element 1 from List_1 followed by element 1 from List_2
followed by element 2 from List_1 followed by element 2 from
List_2....etc.
C. Display the second integer from List_3 and then calculate and
display the number of occurrences of the second integer in
List_3.( not allowed to use count method )
D. Interchange the first and last element of list_3.
E. Find the minimum and the max values in List_3.( not allowed
to use min and max methods )
F. Create a new List ( List_4) by removing all duplicate Integers
that are in List_3. Display List_4 and then display length of
List_4.
G. Sort the Integers in Lists_4 in descending order from highest to
lowest. Display List_4.( Not allowed to use a sort method )
H. Reverse the elements of List_4. Display the reversed List (
Not allowed to use the reverse method )

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!