-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathchallenge1.py
More file actions
29 lines (26 loc) · 834 Bytes
/
Copy pathchallenge1.py
File metadata and controls
29 lines (26 loc) · 834 Bytes
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
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 score in student_scores:
if student_scores[score] >= 91:
print(student_scores[score])
student_grades[score]='Outstanding'
elif student_scores[score] >= 81:
print(student_scores[score])
student_grades[score]='Exceeds expectation'
elif student_scores[score] >= 71:
print(student_scores[score])
student_grades[score]='Acceptable'
else:
print(student_scores[score])
student_grades[score]='Fail'
# 🚨 Don't change the code below 👇
print(student_grades)