Python/학교
Python while
while문의 기본 구조 # while문의 기본 구조 # while : # # # while문 # 열번 찍어 안 넘어 가는 나무 없다. treeHit = 0 while treeHit < 10: treeHit+=1 print('나무를 %d번 찍었습니다.'%treeHit) if(treeHit == 10): print('나무 넘어갑니다.') while문 실습1 # while문 실습1 repeat = 1 while repeat == 1: flag = int(input('마음에 드는 게임이 있나요?(예:1/아니오 : 0)')) if flag == 1: print('다운로드 하세요.') repeat = 0 else: print('다음에 다시 한 번') print('다른 게임 어플을 골라보세요') while문 실습2..
2020. 9. 22. 16:13
최근댓글