https://www.acmicpc.net/problem/9498
9498번: 시험 성적
시험 점수를 입력받아 90 ~ 100점은 A, 80 ~ 89점은 B, 70 ~ 79점은 C, 60 ~ 69점은 D, 나머지 점수는 F를 출력하는 프로그램을 작성하시오.
www.acmicpc.net
[정답]
score=int(input())
if score>=90 and score<=100:
print('A')
elif score>=80 and score<90:
print('B')
elif score>=70 and score<80:
print('C')
elif score>=60 and score<70:
print('D')
else:
print('F')
'알고리즘 공부 > 백준 > Python3' 카테고리의 다른 글
[백준 파이썬] #2562: 최댓값 (0) | 2020.11.04 |
---|---|
[백준 파이썬] #14681: 사분면 고르기 (0) | 2020.11.03 |
[백준 파이썬] #2753: 윤년 (0) | 2020.11.03 |
[백준 파이썬] #10818: 최소, 최대 (0) | 2020.11.03 |
[백준 파이썬] #2884: 알람 시계 (0) | 2020.11.03 |