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):
|
||||
return x%2
|
||||
|
||||
list1=sorted(list1,key=func1)
|
||||
print(list1)
|
||||
c=[]
|
||||
for student in range(len(students)):
|
||||
c.append(sum(students[student][1])/len(students[student][1]))
|
||||
print('Максимальный балл: ',students[c.index(max(c))][0],'',max(c))
|
||||
Reference in New Issue
Block a user