PythiloMedium · 25 min · Task 61 of 100 · progress kept in this browser

Count obstacle-free grid paths

Return the number of paths from the top-left to bottom-right of a rows by cols grid moving only right or down. A zero dimension returns zero.

counts = [1, 1, 1]
for column in range(1, len(counts)):
    counts[column] += counts[column-1]
print(counts)
Your task

Return the number of paths from the top-left to bottom-right of a rows by cols grid moving only right or down. A zero dimension returns zero.