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.



Expert's answer

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!

LATEST TUTORIALS
APPROVED BY CLIENTS