Given an integer number N as input.write a program to print the hollow rigthangled triangular pattern of N lines as shown below
def rtriangle(n):
print('*')
for i in range(n-2):
s = '*' + ' '*i + '*'
print(s)
print('*'*n)
n = int(input())
rtriangle(n)
Comments
Leave a comment