기차에서 심심해서

Root(√)·2020년 8월 9일
0

"""
*
**
***
****
*****

"""


i=1
while i<6:
	print(i * "*")
	i+=1
	
"""
*
**
***
**
*
"""

print()

i=1
while i<4:
	print(i*"*")
	i+=1

j=0
while j<2:
  print((2-j)*"*")
  j += 1

print()

"""
  *
 ***
*****

"""

i=0
j=0

while i<3:
	
	print((2-j)* " ", (2*(i+1)-1) * "*")
	i+=1
	j+=1

print()

"""
  *
 ***
*****
 ***
  *
  
"""

i=0
j=0

while i<3:
	
	print((2-j)* " ", (2*(i+1)-1) * "*")
	i+=1
	j+=1

i=1
j=0

while j<2:
	print((j+1) * " ", (2*i+1) * "*")
	i -= 1
	j+= 1
profile
Software Engineer

0개의 댓글