Answer to Question #268613 in Python for taufiq umar

Question #268613

Given an integer number N as input,write a program to print the right angled triangular pattern of N lines..

Note:There is space after each asterisk (*) character.



1
Expert's answer
2021-11-19T10:01:54-0500
rows = int(input("Enter the number of rows: "))
for ​i in range(rows, 0, -1):  
    print(" "*(rows-i) ,end="")
    for j in range(0, i ):  
        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