Skip to content

Commit 1ee00f8

Browse files
Create shubh_labh_sign.py
1 parent 0bea38b commit 1ee00f8

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

pattern/shubh_labh_sign.py

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
n=int(input("enter a number: "))
2+
for i in range(1,n+1):
3+
if i!=n:
4+
print("* ",sep='',end="")
5+
print(" "*(n-2),sep="",end='')
6+
if i==1:
7+
print("* "*n,sep='',end="")
8+
else:
9+
print("* ",end="",sep='')
10+
else:
11+
print('* '*(2*n-1),end="",sep='')
12+
print()
13+
for i in range(1,n):
14+
if i!=n-1:
15+
print(' '*(n-1),end='',sep="")
16+
print('* ',end='',sep="")
17+
print(' '*(n-2),end='',sep="")
18+
print('* ',end='',sep="")
19+
else:
20+
print('* '*n,end='',sep="")
21+
print(' '*(n-2),end='',sep="")
22+
print("* ",sep="",end='')
23+
print()
24+
'''
25+
output:
26+
enter a number: 9
27+
* * * * * * * * * *
28+
* *
29+
* *
30+
* *
31+
* *
32+
* *
33+
* *
34+
* *
35+
* * * * * * * * * * * * * * * * *
36+
* *
37+
* *
38+
* *
39+
* *
40+
* *
41+
* *
42+
* *
43+
* * * * * * * * * *
44+
'''

0 commit comments

Comments
 (0)