File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change 114
114
r = r + 1
115
115
c = c + 1
116
116
print ("" )
117
+
118
+ '''
119
+ * * * * * * * * * *
120
+ * *
121
+ * *
122
+ * *
123
+ * *
124
+ * *
125
+ * *
126
+ * *
127
+ * *
128
+ * * * * * * * * * *
129
+ '''
130
+ no_of_rows = int (input ("Input the number of rows required for the pattern : " ))
131
+ print ()
132
+ for i in range (no_of_rows ):
133
+ for j in range (no_of_rows ):
134
+ if (i == 0 or i == no_of_rows - 1 or j == 0 or j == no_of_rows - 1 ):
135
+ print (' * ' , end = '' )
136
+ else :
137
+ print (' ' , end = '' )
138
+ print ()
139
+
140
+ '''
141
+ * * * * *
142
+ * * * *
143
+ * * *
144
+ * * * *
145
+ * * * * *
146
+ '''
147
+ no_of_rows = int (input ("Input the number of rows required for the pattern : " ))
148
+ print ()
149
+ for i in range (no_of_rows ):
150
+ for j in range (no_of_rows ):
151
+ if (i == j or i == 0 or i == no_of_rows - 1 or j == (no_of_rows - 1 - i ) or j == 0 or j == no_of_rows - 1 ):
152
+ print (' * ' , end = '' )
153
+ else :
154
+ print (' ' , end = '' )
155
+ print ()
You can’t perform that action at this time.
0 commit comments