RUBY
중첩 조건문 본문
중첩 조건문
- 조건문 안에 또 다른 조건문이 있을 수 있다.
exampleScore = int(input('성적 : '))
if exampleScore < 60:
print('재시험 대상입니다.')
else :
if exampleScore >= 90:
print('A')
elif exampleScore >= 80:
print('B')
elif exampleScore >= 70:
print('C')
elif exampleScore >= 60:
print('D')
'프로그래밍 언어 > Python' 카테고리의 다른 글
횟수에 의한 반복(for문) (0) | 2023.01.07 |
---|---|
반복문 (0) | 2023.01.07 |
다자택일 조건문 사용 시 주의할 점 (0) | 2023.01.05 |
다자택일 조건문 (0) | 2023.01.05 |
if~else문과 조건식 (0) | 2023.01.05 |
Comments