forked from keshavsingh4522/Python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathshubh_labh_sign.py
44 lines (44 loc) · 1.03 KB
/
shubh_labh_sign.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
n=int(input("enter a number: "))
for i in range(1,n+1):
if i!=n:
print("* ",sep='',end="")
print(" "*(n-2),sep="",end='')
if i==1:
print("* "*n,sep='',end="")
else:
print("* ",end="",sep='')
else:
print('* '*(2*n-1),end="",sep='')
print()
for i in range(1,n):
if i!=n-1:
print(' '*(n-1),end='',sep="")
print('* ',end='',sep="")
print(' '*(n-2),end='',sep="")
print('* ',end='',sep="")
else:
print('* '*n,end='',sep="")
print(' '*(n-2),end='',sep="")
print("* ",sep="",end='')
print()
'''
output:
enter a number: 9
* * * * * * * * * *
* *
* *
* *
* *
* *
* *
* *
* * * * * * * * * * * * * * * * *
* *
* *
* *
* *
* *
* *
* *
* * * * * * * * * *
'''