[PYTHON] 백준 9498 - 시험 성적

이또삐(이민혁)·2023년 4월 13일

CODINGTEST

목록 보기
4/96
post-thumbnail

성능 요약

메모리: 113112 KB, 시간: 116 ms

분류

구현

문제 설명

시험 점수를 입력받아 90 ~ 100점은 A, 80 ~ 89점은 B, 70 ~ 79점은 C, 60 ~ 69점은 D, 나머지 점수는 F를 출력하는 프로그램을 작성하시오.

입력

첫째 줄에 시험 점수가 주어진다. 시험 점수는 0보다 크거나 같고, 100보다 작거나 같은 정수이다.

출력

시험 성적을 출력한다.

#https://www.acmicpc.net/problem/9498
#시험 성적

import sys
input = sys.stdin.readline

a = int(input())

if a>=90:
    print("A")
elif a>=80:
    print("B")
elif a>=70:
    print("C")
elif a>=60:
    print("D")
else:
    print("F")
#https://www.acmicpc.net/problem/9498
#시험 성적
#9498

import sys
input = sys.stdin.readline

score = int(input())

def fun(score):
    if score >= 90:
        return print("A")
    elif score >= 80:
        return print("B")
    elif score >= 70:
        return print("C")
    elif score >= 60:
        return print("D")
    else:
        return print("F")
    
fun(score)
profile
해보자! 게임 클라 개발자!

0개의 댓글