while

조건이 참인 동안 계속 반복합니다. 조건을 조절하기 위해 조건문을 **while**문 내부에서 다뤄야한다. python에서는 증감 연산자가 없다.

예시

# while
c = 10

while c:
    print(c)
    c = c-1

# while 무한루프  
while True:
		print("c") # ctrl + c로 무한 루프 종류

break

while, **for**와 같은 반복문 안에서 특정 조건게 반복문을 중단시키고, 반복문을 빠져 나올때 사용한다.

예시

  
# break
while True:
    response = input('input number:')
    if int(response) % 10 == 0:
        print('10으로 나누었을때 나머지가 0입니다.')
        break

continue

**continue**는 **break**와 비슷하게 **for**와 while 반복문을 중단 시키지 않고 다음 반복으로 넘어간다.

예시

# continue
while True:
    response = input('input number:')
    result = int(response)%10
    if result == 0 :
        continue
    print("10으로 나눈 나머지는{}입니다.".format(result)) # formatting