Subham DasJun 6, 20191 min read#9 Right Triangle with Alphabetsn=int(input("Enter Number :"))#Pattern 9 print('(09)') i = 1 while i <= n : j = 0 while j <= i-1 : print(chr(65+j), end=" ") j+=1 i += 1 print() print()
n=int(input("Enter Number :"))#Pattern 9 print('(09)') i = 1 while i <= n : j = 0 while j <= i-1 : print(chr(65+j), end=" ") j+=1 i += 1 print() print()
Subham DasJun 6, 20191 min read#8 Isosceles Triangle n=int(input("Enter Number :"))#Pattern 8 print('(08)') a = n//2 + 1 for i in range (1,a+1) : for j in range (1,i) : print ('*', end=" ") print()for i in range (a,1,-1) : for j in range (i-1,1,-1) : print('*', end=" ") print() print()
n=int(input("Enter Number :"))#Pattern 8 print('(08)') a = n//2 + 1 for i in range (1,a+1) : for j in range (1,i) : print ('*', end=" ") print()for i in range (a,1,-1) : for j in range (i-1,1,-1) : print('*', end=" ") print() print()
Subham DasJun 6, 20191 min read#7 Equilateral Triangle with space insiden=int(input("Enter Number :"))#Pattern 7 print('(07)') k = 2 for i in range (1,n+1) : for j in range (1,n*2) : if j+i == n+1 or j-i == n-1 : print('*', end="") elif i == n and j != k: print('*', end="") k+=2 else : print(end=" ") print() print()
n=int(input("Enter Number :"))#Pattern 7 print('(07)') k = 2 for i in range (1,n+1) : for j in range (1,n*2) : if j+i == n+1 or j-i == n-1 : print('*', end="") elif i == n and j != k: print('*', end="") k+=2 else : print(end=" ") print() print()