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

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

print('----문제1----')
age = 10

if age < 8:
    print('유치원생')
elif age < 14:
    print('초등학생')
elif age < 17:
    print('중학생')
elif age < 20:
    print('고등학생')
else:
    print("기타")

print('----문제2----')
fruit = '사과'

if fruit == '사과':
    print('1000원입니다.')
elif fruit == '바나나':
    print('1500원입니다.')
elif fruit == '포도':
    print('2000원입니다.')
else:
    print('판매하지 않는 과일입니다.')




Embed on website

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