티스토리 뷰

student_scores = {
  "Harry": 81,
  "Ron": 78,
  "Hermione": 99, 
  "Draco": 74,
  "Neville": 62,
}
# ? Don't change the code above ?
#TODO-1: Create an empty dictionary called student_grades.
student_grades = {}
#TODO-2: Write your code below to add the grades to student_grades.?
for key in student_scores:
    score = student_scores[key]
    if score > 90 and score <=100 :
        student_grades[key] = "Outstanding"
    elif score >80:
        student_grades[key] = "Exceeds Expectations"
    elif score >70:
        student_grades[key] = "Acceptable"
    else:
        student_grades[key] = "Fail"
# ? Don't change the code below ?
print(student_grades)
---------------------------------------------------------
{'Harry': 'Exceeds Expectations', 'Ron': 'Acceptable', 'Hermione': 'Outstanding', 'Draco': 'Acceptable', 'Neville': 'Fail'}
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2025/08   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
글 보관함