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 093ee18 commit 3a6126aCopy full SHA for 3a6126a
Alphabetic Patterns/alphabeticpattern21.py
@@ -0,0 +1,26 @@
1
+def pattern(n):
2
+ alpha = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
3
+ counter = 0
4
+ for i in range(0,n+1):
5
+ for j in range(0,i):
6
+ if(counter>25):
7
+ counter = counter - 26
8
+ print(alpha[counter],end=" ")
9
+ counter=counter+1
10
+ print("")
11
+
12
+print("Enter the number of rows: ")
13
+n = int(input())
14
+pattern(n)
15
16
17
+# OUTPUT
18
19
+# Enter the number of rows:
20
+# 5
21
22
+# A
23
+# B C
24
+# D E F
25
+# G H I J
26
+# K L M N O
0 commit comments