Write a program in Python to produce Star triangle.

By ayush goel in 22 Sep 2023 | 04:12 pm
ayush goel

ayush goel

Student
Posts: 346
Member since: 21 Sep 2023

Write a program in Python to produce Star triangle.

22 Sep 2023 | 04:12 pm
0 Likes
divas goyal

divas goyal

Student
Posts: 453
Member since: 22 Sep 2023

n = 5  # Number of rows

for i in range(1, n + 1):

    print(" " * (n - i) + "*" * (2 * i - 1))


22 Sep 2023 | 06:21 pm
0 Likes

Report

Please describe about the report short and clearly.