We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 612e653 commit ee591b0Copy full SHA for ee591b0
dict_excercise.py
@@ -0,0 +1,24 @@
1
+student_marks={
2
+ "Jenny":92,
3
+ "Harry":78,
4
+ "Dimpy":56,
5
+ "Rahul":41,
6
+ "Aniket":99,
7
+ "Prem":34
8
+}
9
+for name,marks in student_marks.items():
10
+ print(name,":",marks)
11
+ if marks>=92 and marks<=100:
12
+ print("Grade:A+")
13
+ elif marks>=81 and marks<=91:
14
+ print("Grade:A")
15
+ elif marks>=71 and marks<=80:
16
+ print("Grade:B+")
17
+ elif marks>=61 and marks<=70:
18
+ print("Grade:B")
19
+ elif marks>=51 and marks<=60:
20
+ print("Grade:C")
21
+ elif marks>=41 and marks<=50:
22
+ print("Grade:D")
23
+ else:
24
+ print("Grade:F")
0 commit comments