Skip to content

Files

Latest commit

 

History

History
 
 

026-two-dimensional-array

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

README.md

026 Two dimensional list

📝 Instructions:

  1. Write a function two_dimensional_list(), that takes 2 digits (x, y) as input and generates a 2-dimensional list or matrix.

  2. The element value in the i row and j column of the list should be i*j (their index values).

📎 Example input:

two_dimensional_list(3,5)

📎 Example output:

[[0, 0, 0, 0, 0], [0, 1, 2, 3, 4], [0, 2, 4, 6, 8]]