Kodewick
Start learning →
Starter←→0 / 100

A times-table row

#020StarterLoopsLists3 min

Times tables practice. Write times_row(n) to return a list of n × 1, n × 2, … up to n × 9.

Examples
times_row(3)→[3, 6, 9, 12, 15, 18, 21, 24, 27]
times_row(1)→[1, 2, 3, 4, 5, 6, 7, 8, 9]
main.py
def times_row(n):
    row = []
    for i in range(1, 10):
        # your code here: put n * i into row
        pass
    return row
Ctrl + Enter runs too
Result

Run tries the examples. When they look right, Submit.