Created
March 25, 2018 01:52
-
-
Save jennyonjourney/5388b0d01d140607d7a3c647a5e26366 to your computer and use it in GitHub Desktop.
Python - continue & whilewhile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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