Python Practice › Loop Programs › Program 53
Right triangle of stars
Write a Python program to print a right triangle of stars with 5 rows.
Output
* * * * * * * * * * * * * * *
Approach
- Row i prints i stars.
Solution
for i in range(1, 6): print("* " * i)Output
* * * * * * * * * * * * * * *
Line by line
Line 2
Repeating “* ” i times builds row i.
Learn the concept
New to this topic? Read the lesson, then come back.