Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jennyonjourney/5388b0d01d140607d7a3c647a5e26366 to your computer and use it in GitHub Desktop.
Save jennyonjourney/5388b0d01d140607d7a3c647a5e26366 to your computer and use it in GitHub Desktop.
Python - continue & whilewhile
i=0
while i<10:
print("시작:", i)
i += 1
if i==5:
continue
print("끝:", i)
i=0
while i<10:
print("시작:", i)
i += 1
if i!=5:
print("끝:", i)
print('-------------')
h=1
while h<=12:
print(h,"시")
m=0
while m<60:
print(h, ":", m)
m+=1
h+=1
print("abcd", end="->") #줄을 안바꿔치기하고 그냥 프린트하기
print("efg")
print("abcd", end=" ") #줄을 안바꿔치기하고 그냥 프린트하기
print("efg")
print("내가 만든 구구단만들기")
i=2
while i<=10:
print(i, "단")
j=1
while j<=10:
print(i, "단", i*j)
j+=1
i+=1
print("선생님이 만든 구구단만들기")
h=2
while h<=10:
print(h, "단")
m=1
while m<=10:
print(h,"x", m,"=",h*m)
m+=1
h+=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment