rows=5 for i in range(1,rows+1): for j in range(1,i+1): print(j ,end= " ") print("")
1 1 2 1 2 3 1 2 3 4 1 2 3 4 5
rows=70 for i in range(65,rows): for j in range(65,i+1): print(chr(j) ,end= " ") print("")
A A B A B C A B C D A B C D E
for i in range(5): for j in range(i+1): print("*" ,end= " ") print("")
* * * * * * * * * * * * * * *
rows=5 for i in range(1,rows+1): for j in range(1,i+1): print(i ,end= " ") print("")
1 2 2 3 3 3 4 4 4 4 5 5 5 5 5
rows=70 for i in range(65,rows): for j in range(65,i+1): \print(chr(i) ,end= " ") print("")
A B B C C C D D D D E E E E E
n=5 k = 8 for i in range(0, n): for j in range(0, k): print(end=" ") k = k - 2 for j in range(0, i+1): print("* ", end="") print()
* * * * * * * * * * * * * * *
n=5 k = 2 * n - 2 for i in range(0, n): for j in range(0, k): print(end=" ") k = k - 1 x = 1 for j in range(0, i + 1): print(x, end=" ") x += 1 print("\r") k = n - 2
1 1 2 1 2 3 1 2 3 4 1 2 3 4 5
r=5 for i in range(r,0,-1): for j in range(1,i): print(end=" ") for k in range(i,r+1): print(k,end=" ") print(" ")
5 4 5 3 4 5 2 3 4 5 1 2 3 4 5
n=5 k = 2 * n - 2 for i in range(0, n): for j in range(0, k): print(end=" ") k = k - 1 x = 65 for j in range(0, i + 1): ch = chr(x) print(ch, end=" ") x += 1 print("\r") k = n - 2
A A B A B C A B C D A B C D E
alp=65 r=5 for i in range(r,0,-1): for j in range(1,i): print(end=" ") for k in range(i,6): print(chr(alp+k-1),end=" ") print(" ")
E D E C D E B C D E A B C D E
n=5 k = 2 * n - 2 x = 0 for i in range(0, n): x += 1 for j in range(0, k): print(end=" ") k = k - 1 for j in range(0, i + 1): print("*", end=" ") print(" ") k = n - 2
* * * * * * * * * * * * * * *
n=5 k = 2 * n - 2 x = 0 for i in range(0, n): x += 1 for j in range(0, k): print(end=" ") k = k - 1 for j in range(0, i + 1): print(x, end=" ") print(" ") k = n - 2
1 2 2 3 3 3 4 4 4 4 5 5 5 5 5
n=5 k = 2 * n - 2 x = 65 for i in range(0, n): ch = chr(x) x += 1 for j in range(0, k): print(end=" ") k = k - 1 for j in range(0, i + 1): print(ch, end=" ") print("\r")
A B B C C C D D D D E E E E E
rows=5 for i in range(rows, 0, -1): for j in range(1, i+1): print(j, end=" ") print("")
1 2 3 4 5 1 2 3 4 1 2 3 1 2 1
rows = 6 for i in range(0, rows): for j in range(rows-1, i, -1): print(j, end=" ") print('')
5 4 3 2 1 5 4 3 2 5 4 3 5 4 5
rows = 5; for i in range(rows, 0,-1): for j in range(rows, i-1,-1): print(j, end=" ") print()
5 5 4 5 4 3 5 4 3 2 5 4 3 2 1
cn = 1 s = 2 rows = 5 for i in range(rows): for j in range(1, s): print(cn, end=' ') cn += 1 print("") s += 1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
rows=70 for i in range(rows, 65, -1): for j in range(65, i): print(chr(j), end=" ") print("")
A B C D E A B C D A B C A B A
rows = 70 for i in range(64, rows): for j in range(rows-1, i, -1): print(chr(j), end=" ") print('')
E D C B A E D C B E D C E D E
rows = 69; for i in range(rows, 64,-1): for j in range(rows, i-1,-1): print(chr(j), end=" ") print()
E E D E D C E D C B E D C B A
n=7 alpha=65 for i in range(1,n): for j in range(1,i): print(chr(alpha),end=" ") alpha+=1 print()
A B C D E F G H I J K L M N O
rows = 5 c = 1 for i in range(1, rows+1): for space in range(1, rows-i+1): print(" ",end="") for j in range(0, i): if j==0 or i==0: c = 1 else: c = c * (i - j)//j print(c, end = " ") print()
1 1 1 1 2 1 1 3 3 1 1 4 6 4 1
alp=65 r=5 for i in range(1,r+1): for j in range(r,i,-1): print(end=" ") t=int(1) for k in range(1,i+1): print(chr(alp-1+t),end=" ") t=int(t*(i-k)/(k)) print(" ")
A A A A B A A C C A A D F D A
rows=5 for i in range(1,rows+1): for j in range(1,i+1): print(j ,end= " ") print("") for i in range(rows, 0, -1): for j in range(1, i): print(j, end=" ") print("")
1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 1 2 3 4 1 2 3 1 2 1
rows=69 for i in range(65,rows+1): for j in range(65,i+1): print(chr(j) ,end= " ") print("") for i in range(rows, 65, -1): for j in range(65, i): print(chr(j), end=" ") print("")
A A B A B C A B C D A B C D E A B C D A B C A B A
rows=5 for i in range(1,rows+1): for j in range(1,i+1): print("*" ,end= " ") print("") for i in range(rows, 0, -1): for j in range(1, i): print("*", end=" ") print("")
* * * * * * * * * * * * * * * * * * * * * * * * *
n=5 k = 2 * n - 2 for i in range(0, n-1): for j in range(0, k): print(end=" ") k = k - 2 for j in range(0, i + 1): print("* ", end="") print(" ") k = -1 for i in range(n-1,-1,-1): for j in range(k,-1,-1): print(end=" ") k = k + 2 for j in range(0, i + 1): print("* ", end="") print(" ")
* * * * * * * * * * * * * * * * * * * * * * * * *
rows=5 for i in range(rows, 0, -1): for j in range(1, i+1): print(j, end=" ") print("") for i in range(2,rows+1): for j in range(1,i+1): print(j ,end= " ") print("")
1 2 3 4 5 1 2 3 4 1 2 3 1 2 1 1 2 1 2 3 1 2 3 4 1 2 3 4 5
rows = 5 for i in range(0, rows + 1): for j in range(rows - i, 0, -1): print(j,end=" ") print("") rows = 6 for i in range(2, rows): for j in range(i, 0, -1): print(j,end=" ") print("")
5 4 3 2 1 4 3 2 1 3 2 1 2 1 1 2 1 3 2 1 4 3 2 1 5 4 3 2 1
rows=70 for i in range(rows, 65, -1): for j in range(65, i): print(chr(j), end=" ") print("") for i in range(66,rows): for j in range(65,i+1): print(chr(j) ,end= " ") print("")
A B C D E A B C D A B C A B A A B A B C A B C D A B C D E
alp=65 r=5 for i in range(r,0,-1): for j in range(i,0,-1): print(chr(alp+j-1),end=" ") print(" ") for i in range(2,r+1): for j in range(i,0,-1): print(chr(alp+j-1),end=" ") print(" ")
E D C B A D C B A C B A B A A B A C B A D C B A E D C B A
rows=5 for i in range(rows, 0, -1): for j in range(1, i+1): print("*", end=" ") print("") for i in range(2,rows+1): for j in range(1,i+1): print("*" ,end= " ") print("")
* * * * * * * * * * * * * * * * * * * * * * * * * * * * *
rows = 4 for i in range(rows): for j in range(rows - 1, i - 1, -1): print(end = " ") for k in range(i + 1): print(k+1, end = " ") for l in range(i - 1, -1, -1): print(l+1, end = " ") print()
1 1 2 1 1 2 3 2 1 1 2 3 4 3 2 1
rows = 4 alp = 65 for i in range(rows): for j in range(rows - 1, i - 1, -1): print(end = " ") for k in range(i + 1): print(chr(alp + k), end = " ") for l in range(i - 1, -1, -1): print(chr(alp + l), end = " ") print()
A A B A A B C B A A B C D C B A
r=5 for i in range(1,r+1): for j in range(1,i): print(0,end=" ") print(i,end=" ") for k in range(i,r): print(0,end=" ") print(" ")
1 0 0 0 0 0 2 0 0 0 0 0 3 0 0 0 0 0 4 0 0 0 0 0 5
r=5 for i in range(1,r+1): for j in range(r,i,-1): print(1,end=" ") for k in range(0,i): print(i,end=" ") print(" ")
1 1 1 1 1 1 1 1 2 2 1 1 3 3 3 1 4 4 4 4 5 5 5 5 5
r=5 alp=65 for i in range(1,r+1): for j in range(r,i,-1): print(chr(alp),end=" ") for k in range(0,i): print(chr(alp+i-1),end=" ") print(" ")
A A A A A A A A B B A A C C C A D D D D E E E E E
r=6 for i in range(1,r): for j in range(r,i,-1): print(end=" ") for k in range(1,i+1): print(k,end=" ") print(" ") for i in range(1,r): for j in range(0,i+1): print(end=" ") for k in range(1,r-i): print(k,end=" ") print(" ")
1 1 2 1 2 3 1 2 3 4 1 2 3 4 5 1 2 3 4 1 2 3 1 2 1
r=6 alp=63 for i in range(1,r): for j in range(r,i,-1): print(end=" ") for k in range(1,i+1): print(chr(alp+k+1),end=" ") print(" ") for i in range(1,r): for j in range(0,i+1): print(end=" ") for k in range(1,r-i): print(chr(alp+k+1),end=" ") print(" ")
A A B A B C A B C D A B C D E A B C D A B C A B A
n = 5 for i in range(n): for j in range(n - i - 1): print(" ", end="") for k in range(2 * i + 1): print("*", end="") print() for i in range(1,n): for j in range(i): print(" ", end="") for j in range(2*(n-i)-1): print("*", end="") print()
* *** ***** ******* ********* ******* ***** *** *
Learn All in Tamil © Designed & Developed By Tutor Joes | Privacy Policy | Terms & Conditions