PRINT AN INVERTED STAR PATTERN
n = int(input("Enter the number of rows: "))
for i in range(n + 1, 0, -1):
for j in range(0, i - 1):
print("*", end=' ')
print(" ")
Answers
Answered by
0
Answer:
n = int(input("Enter the number of rows: "))
for i in range(n + 1, 0, -1):
for j in range(0, i - 1):
print("*", end=' ')
print(" ")
This program will print
* * * * *
* * * *
* * *
* *
*
This if the number of rows is 5
Explanation:
Similar questions
English,
1 month ago
English,
1 month ago
Math,
1 month ago
Accountancy,
3 months ago
Math,
10 months ago