Build the rows
The outer counter x counts down from 5 to 1, choosing the value for each new row.
The rows show 55555, 44444, 33333, 22222, and 11111.
The outer counter x counts down from 5 to 1, choosing the value for each new row.
A second five-iteration loop prints x repeatedly, so the row value stays constant across all five columns.
The inner print calls use end="" to keep values on the same line. The final empty print() moves to the next row.