파이썬 육망성
2020. 1. 3. 16:54ㆍ프로그래밍/Python
반응형
#!/usr/bin/python
print("insert number : ", end='')
line =int(input())
num_star=4*line-1
for i in range(0,line,1):
num_white=2*line-i-1
print((" "*num_white) + ("*"*(i+(i+1))))
for i in range(0,line,1):
num_white=i
print((" "*num_white) + ("*"*num_star))
num_star -=2
num_star +=2
for i in range(line-1,0,-1):
num_white=i-1
num_star +=2
print((" "*num_white) + ("*"*num_star))
for i in range(line,0,-1):
num_white=2*line-i
print((" "*num_white) + ("*"*(i+(i-1))))
반응형