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("")

LATEST TUTORIALS
APPROVED BY CLIENTS