Build the rows
The outer loop counts down from 5, while the padding loop adds spaces as the rows narrow.
The first row has five spaced stars; each following row is shorter and shifted farther right.
The outer loop counts down from 5, while the padding loop adds spaces as the rows narrow.
The inner loop prints x copies of "* ", so both the star count and row width decrease.
The inner print calls use end="" to keep values on the same line. The final empty print() moves to the next row.