def isUniversityStudent(age):
return '대'
def isHighStudent(age):
return '고등'
def isMiddleStudent(age):
return '중'
def isElementaryStudent(age):
return '초등'
def printStatus(status):
print('안녕! {}학생...'.format(status))
a=int(input('당신이 태어난 년도를 입력하세요:'))
age=2017-a+1
if 20<=age<=26:
status=isUniversityStudent(age)
elif 17<=age<20:
status=isHighStudent(age)
elif 14<=age<17:
status=isMiddleStudent(age)
elif 8<=age<14:
status=isElemantaryStudent(age)
printStatus(status)
여기서 나이에 안걸리면 출력없이 종료하고 싶은데 어케 해야 하는지 아니..없겠지...따흑

인스티즈앱
서울에서 무례하다고 난리난 일본스타..JPG