Skip to content

Commit 65c1eae

Browse files
author
MRGAMING666709
authored
Add files via upload
1 parent 03a4251 commit 65c1eae

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

butterflyPattern.py

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
def butterflyPattern(n):
2+
for i in range(n//2):
3+
print("* "*(i+1),end="")
4+
print(" "*(((n+1)//2 - 2)*4 - 4*i + 1),end="")
5+
print(" *"*(i+1))
6+
print("* "*(n//2),end="*")
7+
print(" *"*(n//2))
8+
for i in range(n//2):
9+
print("* "*(n//2 - i),end="")
10+
print(" "*(1 + 4*i),end="")
11+
print(" *"*(n//2 - i))
12+
13+
n = int(input())
14+
butterflyPattern(n)

0 commit comments

Comments
 (0)