We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5f2dc31 commit a0b39dcCopy full SHA for a0b39dc
patterns/PatternF.py
@@ -0,0 +1,38 @@
1
+__author__ = 'Avinash'
2
+
3
+# Python3 program to print alphabet F pattern
4
5
+# *********
6
+# *
7
8
9
10
11
12
13
14
15
+def print_pattern(n):
16
+ # Outer for loop for number of rows
17
+ for row in range(n):
18
19
+ # Inner for loop columns
20
+ for column in range(n):
21
22
+ # prints first and middle row
23
+ if ((row == 0 or row == n // 2) or
24
25
+ # prints first column
26
+ column == 0):
27
+ print("*", end="")
28
+ else:
29
+ print(" ", end="")
30
+ print()
31
32
33
+size = int(input("Enter size: \t"))
34
35
+if size < 8:
36
+ print("Enter a size greater than 8")
37
+else:
38
+ print_pattern(size)
0 commit comments