Notice
Recent Posts
Recent Comments
Link
«   2025/02   »
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28
Archives
Today
Total
관리 메뉴

RUBY

중첩 조건문 본문

프로그래밍 언어/Python

중첩 조건문

ruby-jieun 2023. 1. 5. 17:59

 

 

중첩 조건문

 


 

 

 

  • 조건문 안에 또 다른 조건문이 있을 수 있다.

 

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