Build the rows
The outer loop adds one row at a time, while a leading-space loop shifts each wider row toward the center.
Centered rows repeat 1 once, 2 three times, 3 five times, and continue with odd-width rows.
The outer loop adds one row at a time, while a leading-space loop shifts each wider row toward the center.
The inc counter grows by two, and num advances by one after each row; the current number is repeated inc times.
The inner print calls use end="" to keep values on the same line. The final empty print() moves to the next row.