#if-elif-else
'''
if 조건1:
    명령1
elif 조건2:
    명령2
elif 조건3:
    명령3
else:
    명령N
'''
score = 75

if score >= 90:
    print('A')
elif score >= 80:
    print('B')
elif score >= 70:
    print('C')
else:
    print('F')

'''
8세 미만: 유치원생
8세 이상 14세 미만: 초등학생,
14세 이상 17세 미만: 중학생,
17세 이상 20세 미만: 고등학생
그 외: 성인
'''
print('----문제----')
age = 20
if age < 8:
    print('유치원생')
elif age < 14:
    print('초등학생')
elif age < 17:
    print('중학생')
elif age < 20:
    print('고등학생')
else:
    print('성인')

# 3월 이상 6월 미만: "봄"
# 6월 이상 9월 미만: "여름"
# 9월 이상 12월 미만: "가을"
# 그 외: "겨울"
# 코드 힌트
month = 12

if 3 <= month < 6:
    print('봄')
elif 6 <= month < 9:
    print('여름')
elif 9 <= month < 12:
    print('가을')
else:
    print('겨울')




    

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: