파이썬 기초 연습장/조건문
[파이썬 조건문] elif구문 구하기
신령 가비
2022. 7. 18. 15:26
728x90
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | if, elif, else(옵션)에 대한 실습 #ㄷ다중조건중 하나만 만족해도 나머지는 검사 안함 score = int(input("성적 입력(0~100)")) if score>=90: print("A") elif score>=80: print("B") elif score>=70: print("C") elif score>=60: print("D") else: #else 구문은 옵션이지만 다중조건을 설정할때는 절대 조건을 명기하면 안된다. print("F") | cs |
728x90