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 e92305e commit c26beeeCopy full SHA for c26beee
Alphabetic Patterns/alphabeticpattern26.py
@@ -0,0 +1,30 @@
1
+def pypart2(n):
2
+ alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
3
+ k = 2*n - 2
4
+ flag = n-1
5
+ for i in range(0, n):
6
+ for j in range(0, k):
7
+ print(end=" ")
8
+ k = k - 2
9
+ counter = flag
10
+ for j in range(0, i+1):
11
+ print(alpha[counter], end=" ")
12
+ flag = flag -1
13
+ print("\r")
14
+
15
16
+print("Enter the number of rows: ")
17
+n = int(input())
18
+pypart2(n)
19
20
21
22
+# OUTPUT
23
24
+# Enter the number of rows:
25
+# 5
26
+# E
27
+# D D
28
+# C C C
29
+# B B B B
30
+# A A A A A
0 commit comments