Skip to content

Commit 3dd03b0

Browse files
pattern
1 parent 65d8a13 commit 3dd03b0

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

pattern/6_1.py

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
n=int(input())
2+
for j in range(2):
3+
for i in range(n):
4+
print(' '*(n-i-1),end='')
5+
print('/',end='')
6+
if i==1:
7+
print(' '*(2*i),end='')
8+
if i>=2:
9+
print(' ','/',' '*((i-2)*2),'\\',' ',end='',sep='')
10+
print('\\')
11+
for i in range(n):
12+
print(' '*(i+2),'\\',sep='',end='')
13+
if i<=n-3:
14+
print(' ','\\',' '*(n-3-i)*2,'/',' ','/',sep='')
15+
else:
16+
print(' '*(n-1-i)*2,'/',sep='')
17+
n+=1
18+
'''
19+
3
20+
/\
21+
/ \
22+
/ /\ \
23+
\ \/ /
24+
\ /
25+
\/
26+
/\
27+
/ \
28+
/ /\ \
29+
/ / \ \
30+
\ \ / /
31+
\ \/ /
32+
\ /
33+
\/
34+
'''

0 commit comments

Comments
 (0)