-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdebug2.py
More file actions
30 lines (28 loc) · 947 Bytes
/
debug2.py
File metadata and controls
30 lines (28 loc) · 947 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
30
def score_to_letter_grade(grade):
if grade > 90:
return "A"
elif grade >= 87:
return "B+"
elif grade == 80:
return "B"
elif grade > 77:
return "C+"
elif grade >= 70:
return "C"
elif grade == 67:
return "D+"
elif grade >= 60:
return "D"
else:
return "F"
print("Grade of 90 should be A: " + score_to_letter_grade(91))
print("Grade of 87 should be B+: " + score_to_letter_grade(87))
print("Grade of 81 should be B: " + score_to_letter_grade(80))
print("Grade of 77 should be C+: " + score_to_letter_grade(78))
print("Grade of 70 should be C: " + score_to_letter_grade(71))
print("Grade of 67 should be D+: " + score_to_letter_grade(67))
print("Grade of 60 should be D: " + score_to_letter_grade(60))
print("Grade of 59 should be F: " + score_to_letter_grade(59))
#Test to see changes
#Test 2
#def function made correction