Answer to Question #242780 in Python for saksham

Question #242780
Pattern - 5:
Write a program that print Equilateral triangle pattern with characters
1
Expert's answer
2021-09-28T00:50:00-0400
n=20
for i in range(1, 11):
    print(' '*n, end='') # repet space for n times
    print('* '*(i)) # repeat stars for i times
    n-=1

                    * 
                   * * 
                  * * * 
                 * * * * 
                * * * * * 
               * * * * * * 
              * * * * * * * 
             * * * * * * * * 
            * * * * * * * * * 
           * * * * * * * * * * 

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