Given an integer number N as input. Write a program to print the double triangular pattern of N lines using an asterisk(*) character as shown below.There is space after each asterisk character.
Explanation: N = 4 there should be 2 triangle pattern with 4 lines each.
N = int(input())
for i in range(1,N+1):
for j in range(i):
print("*", end=' ')
print()
print()
for i in range(1,N+1):
for j in range(i):
print("*", end=' ')
print()
Comments
Leave a comment