MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / solution

Function solution

Python/Nestedlist.py:1–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1def solution():
2 result =[]
3 scores_list = []
4 for _ in range(int(input("Number of students?? "))):
5 name = str(input("Students' name? ").strip())
6 score = float(input("{}'s Marks ".format(name)))
7 result+=[[name,score]]
8 scores_list+=[score]
9
10 b = sorted(list(set(scores_list)))[1]
11
12 for a,c in sorted(result):
13 if c==b:
14 print(a)
15
16if __name__ == '__main__':
17 solution()

Callers 1

Nestedlist.pyFile · 0.85

Calls 1

printFunction · 0.50

Tested by

no test coverage detected