score = input()
grade = 0
if score[0] == 'A':
grade += 4
elif score[0] == 'B':
grade += 3
elif score[0] == 'C':
grade += 2
elif score[0] == 'D':
grade += 1
if score == 'F':
grade = 0
elif score[1] == '+':
grade += 0.3
elif score[1] == '-':
grade -= 0.3
print(float(grade))
'코테 준비' 카테고리의 다른 글
백준 5063번 - TGN(Python) (0) | 2022.05.22 |
---|---|
백준 7567번 - 그릇(Python) (0) | 2022.05.21 |
백준 10156번 - 과자(Python) (0) | 2022.03.20 |
백준 2476번 - 주사위 게임(Python) (0) | 2022.03.20 |
백준 4101번 - 크냐?(Python) (0) | 2022.03.18 |