8000
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 04d728d commit 9a2a6a0Copy full SHA for 9a2a6a0
patterns/Pattern-T.py
@@ -0,0 +1,40 @@
1
+__author__ = 'Avinash'
2
+
3
4
+# Python3 program to print alphabet pattern T
5
6
+'''
7
+* * * * * * * * *
8
+ *
9
10
11
12
13
14
15
16
17
18
19
+def print_pattern(n):
20
+ for row in range(n):
21
+ for column in range(n):
22
+ if (
23
+ # first row
24
+ (row == 0) or
25
26
+ # middle column
27
+ (column == n//2)
28
+ ):
29
+ print("*", end=" ")
30
+ else:
31
+ print(" ", end=" ")
32
+ print()
33
34
35
+size = int(input("Enter a size: \t"))
36
37
+if size < 8:
38
+ print("Enter a size minimum of 8")
39
+else:
40
+ print_pattern(size)
0 commit comments