We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 23efbf6 commit f5f7178Copy full SHA for f5f7178
Pyramid Patterns/pyramidpattern75.py
@@ -0,0 +1,34 @@
1
+height = int(input())
2
+k = height-1
3
+x = 1
4
+y = 1
5
+
6
+for i in range(1,height+1):
7
8
+ for j in range(1,k+1):
9
+ print(end=" ")
10
11
+ for j in range(1,i*2):
12
13
+ if(i%2 != 0):
14
+ print(x,end=" ")
15
+ x += 1
16
17
+ if(x >9):
18
+ x = 1
19
20
+ else:
21
+ c = chr(y+64)
22
+ print(c,end=" ")
23
+ y += 1
24
25
+ k -= 1
26
+ print()
27
28
+# Sample Input :- 5
29
+# Output :-
30
+# 1
31
+# A B C
32
+# 2 3 4 5 6
33
+# D E F G H I J
34
+# 7 8 9 1 2 3 4 5 6
0 commit comments