Skip to content

Commit 4a56ff0

Browse files
Create student_marks_by_name.py
1 parent 12a47ff commit 4a56ff0

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

student_marks_by_name.py

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
n=int(input('enter no of student to store thier details: '))
2+
d={}
3+
for i in range(n):
4+
name,*marks=input('enter name marks of p c m: ').split()
5+
marks=list(map(float,marks))
6+
d[name]=marks
7+
q=input('enter student name: ')
8+
t=sum(d[q])/3
9+
print(q,' %.2f'%t)

0 commit comments

Comments
 (0)