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 3a6126a commit 67026d4Copy full SHA for 67026d4
Alphabetic Patterns/alphabeticpattern23.py
@@ -0,0 +1,30 @@
1
+def pypart2(n):
2
+ alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
3
+ k = 2*n - 2
4
+ counter = 0
5
+ for i in range(0, n):
6
+ for j in range(0, k):
7
+ print(end=" ")
8
+ k = k - 2
9
+
10
+ for j in range(0, i+1):
11
+ print(alpha[counter], end=" ")
12
+ counter=counter+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
+# A
27
+# B B
28
+# C C C
29
+# D D D D
30
+# E E E E E
0 commit comments