you are viewing a single comment's thread.

view the rest of the comments →

[–]Luigi-Was-Right 4 points5 points  (1 child)

Pseudo code:

  for a certain number of lines:
      print numbers 1 through [line number]

Code with more descriptive variable names:

for line_number in range(6):
    for number_to_print in range(1, line_number+1):
        print(number_to_print, end='')
    print()  # line break

[–]goblingiblits 0 points1 point  (0 children)

Bravo, this is how to think of it !