Skip to content

Commit d5e02d1

Browse files
committed
Student marks grading
1 parent 69966d9 commit d5e02d1

File tree

3 files changed

+39
-37
lines changed

3 files changed

+39
-37
lines changed

Caesar_chiher.py

Lines changed: 0 additions & 36 deletions
This file was deleted.

README.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

Student.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
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)

0 commit comments

Comments
 (0)