K08
Letter Grade Aggregator
Problem Statement & Objective
An academic grading portal takes a list of numeric test scores (0 to 100) and maps each score to a letter grade based on standard institutional cutoffs:
• 90 - 100: 'A'
• 80 - 89: 'B'
• 70 - 79: 'C'
• 60 - 69: 'D'
• 0 - 59: 'F'
Return the list of mapped letter grades preserving the input order.
Function Signature (Python)
letter_grades(scores: list[int]) -> list[str]Input & Output Contract
Output Rule:List of strings containing letter grades corresponding to each score.
System Constraints
0 <= len(notlar) <= 10^4
0 <= notlar[i] <= 100Example Execution Walkthrough
notlar = [95, 82, 67, 54]
95 -> 'A', 82 -> 'B', 67 -> 'D', 54 -> 'F'
result: ['A', 'B', 'D', 'F']Example Test Scenarios (3)
Example 1
Input:
[[95,82,70,55,49]]Expected Output:
["AA","BA","BB","CC","FF"]Example 2: Tüm Not Kademeleri
Input:
[[100,85,75,65,50,0]]Expected Output:
["AA","BA","BB","CB","CC","FF"]Example 3: Eşik Altı Notlar
Input:
[[70,69,59]]Expected Output:
["BB","CB","CC"]