belongs to collection: Exercises for Intermediate python developers
1 1 1 1 1 2 2 2 2 3 3 3 4 4 5
Hint:
x = 0
for
x
i
Solution:
rows = 5 x = 0 # reverse for loop from 5 to 0 for i in range(rows, 0, -1): x += 1 for j in range(1, i + 1): print(x, end=' ') print('\r')
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Hint:
x = 0
for
loopsx
by 1 in each iteration of an outer loopi
of the outer loopx
in each iteration of an inner loopSolution:
need an explanation for this answer? contact us directly to get an explanation for this answer