Question: Creating a 2 D list In this short project, you will create a 2 D list or random integers using the . append ( )

Creating a 2D list
In this short project, you will create a 2D list or random integers using the . append() method and nested
loops (meaning, a loop inside a loop).
Name your file create_two_d_list.py .
Remember to import random and set the seed to 123.
Your function should take a width and length as arguments. The length represents how many sublists
you need in your main list. The width is the length of each individual sublist (they are all the same length).
Each element in your sublist will be a random integer between 0 and 100.
my_two_d_list = create_list (5,3)
print (my_two_d_list)
[634119852341344868714243620]
my_two_d_list = create_list (3,5)
print (my_two_d_list)
[634119852341344868714243620]
 Creating a 2D list In this short project, you will create

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!