Project and EspHome
This commit is contained in:
11
f.py
11
f.py
@@ -1,7 +1,6 @@
|
|||||||
list1=[1,4,7,9,2,13,6,1,10]
|
students = [["Alice", [5, 4, 4, 5]],["Bob", [3, 4, 4, 3]],["Charlie", [5, 5, 5, 4]]]
|
||||||
|
|
||||||
def func1(x):
|
c=[]
|
||||||
return x%2
|
for student in range(len(students)):
|
||||||
|
c.append(sum(students[student][1])/len(students[student][1]))
|
||||||
list1=sorted(list1,key=func1)
|
print('Максимальный балл: ',students[c.index(max(c))][0],'',max(c))
|
||||||
print(list1)
|
|
||||||
Reference in New Issue
Block a user