Answer to Question #320960 in Python for Chaitanya

Question #320960

How to draw a hollow inverted triangle in phython with equal sides and equal symbols




1
Expert's answer
2022-03-30T07:39:50-0400
totalrows = int(input("Enter the number of rows: "))

for row in range(1, totalrows+1):

    for space in range(1, (totalrows-row)+1):
        print(" ", end="")

    for symbol in range(1, row+1):
        print("* ", end="")
     
    print()

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS