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')