if조건식
-
Python Chapter03방뚝딱 학습노트 2023. 8. 9. 23:14
교재 : 멘토씨리즈 파이썬 제어문 프로그램의 흐름을 제어하는 문법 프로그램의 흐름 위 > 아래 / 왼 > 오른쪽 으로 읽어간다. 제어문 조건문 조건에 의해서 명령을 실행, 실행하지 않을지 흐름을 제어하는 문법 반복문 조건에 의해서 명령을 반복할지, 반복하지 않을지 제어하는 문법 조건문 조건에 의해서 명령을 실행할지 말지를 정하는 문법 if문조건식이 참일 때 실행하는 명령 만약에 조건식이 참이라면 명령을 실행해라. if 조건식 : 조건식이 참일 때 실행하는 명령 - 만약에 조건식이 참이라면 명령을 실행해라. 활용1) not을 적는 경우 반대로 0보다 클때는 출력이 안됨| 활용2) if문은 항상 print를 들여쓰기를 해줘야 실행됩니다.| 조건문 안에서 실행할 문장은 반드시 들여쓰기를 해야한다. 공백이나 탭..