Skip to content

Commit ee591b0

Browse files
committed
dict_excercise.py
1 parent 612e653 commit ee591b0

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

dict_excercise.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)