A function that returns the results of a Python multiplication table to a list

Asked 1 weeks ago, Updated 1 weeks ago, 1 views

You're writing a function that returns multiplication results to the list

def gugu(a):
    b = List of multiplication table results for stage a
    return b

The teacher wants to do this

I don't know how to fill out that format, so I ask for your help!

It's possible to make gugudan only, but the result [2,4,6,8,10,12,14,16,18] It should be in the list form I can't return the value

python

2022-09-20 08:56

1 Answers

Do your homework by yourself. I'll just give you a hint.

a = []
for i in range(4):
    a.append(i)


2022-09-20 08:56

If you have any answers or tips


© 2022 pinfo. All rights reserved.