A right-aligned triangle
Write code · Challenge · §7.6 Nested loops and the first math helper
Print n lines of stars, starting with 1 star on the first line and adding one more on each line, but line them up on the right. On each line, print the spaces first and then the stars.
Starter code
n = 5Solve this problem in your browser
Python runs in your browser and checks your answer right away. Hints and the answer are on the problem page.