write a python program to print star pyramid pattern in 15 lines
Answers
Answered by
7
Answer:
Pattern - 7: Print two pyramid in a single pattern
rows = input("Enter the number of rows: ")
# Outer loop will print the number of rows.
for i in range(0, rows):
# This inner loop will print the stars.
for j in range(0, i + 1):
print("*", end=' ')
# Change line after each iteration.
print(" ")
Similar questions