- #1
mathmari
Gold Member
MHB
- 5,049
- 7
Hey!
I want to write a function in Python that returns the multiplication table $20\times 20$.
We do that using lists in lists, right? I have written the following :
Is that correct? :unsure:
I want to write a function in Python that returns the multiplication table $20\times 20$.
We do that using lists in lists, right? I have written the following :
Code:
def mul_table() :
Prod = []
Table = []
for i in range(21) :
for j in range(21) :
Prod.append(i*j)
Table.append(Prod)
return Table
print(mul_table())