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 67026d4 commit e92305eCopy full SHA for e92305e
Alphabetic Patterns/alphabeticpattern25.py
@@ -0,0 +1,31 @@
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
+ counter =counter + 1
13
+ flag = flag -1
14
+ print("\r")
15
+
16
17
+print("Enter the number of rows: ")
18
+n = int(input())
19
+pypart2(n)
20
21
22
23
+# OUTPUT
24
25
+# Enter the number of rows:
26
+# 5
27
+# E
28
+# D E
29
+# C D E
30
+# B C D E
31
+# A B C D E
0 commit comments