File tree Expand file tree Collapse file tree 3 files changed +39
-37
lines changed Expand file tree Collapse file tree 3 files changed +39
-37
lines changed Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ student_marks = {
2+ "Ram" : 78 ,
3+ "Mosh" : 98 ,
4+ "Shyam" : 67 ,
5+ "John" : 56 ,
6+ "Tata" : 32 ,
7+ "Sita" : 85 ,
8+ "Ravi" : 92 ,
9+ "Anita" : 45 ,
10+ "Raj" : 74 ,
11+ "Geeta" : 66 ,
12+ "Ali" : 58 ,
13+ "Nina" : 82 ,
14+ "Kumar" : 34 ,
15+ "Sara" : 77 ,
16+ "Vikram" : 89 ,
17+ "Priya" : 63 ,
18+ "Amit" : 91
19+ }
20+
21+ student_grade = {}
22+ for student in student_marks :
23+ marks = student_marks [student ]
24+ if marks >= 90 :
25+ student_grade [student ] = "A+"
26+ elif marks >= 80 :
27+ student_grade [student ] = "A"
28+ elif marks >= 70 :
29+ student_grade [student ] = "B+"
30+ elif marks >= 60 :
31+ student_grade [student ] = "B"
32+ elif marks >= 50 :
33+ student_grade [student ] = "C"
34+ elif marks >= 35 :
35+ student_grade [student ] = "D"
36+ else :
37+ student_grade [student ] = "F"
38+
39+ print (student_grade )
You can’t perform that action at this time.
0 commit comments