Feat(NSI): QCM pour le DS5
This commit is contained in:
3
1NSI/Evaluations/DS_2023-05-22/scripts/qcm_list_dico.py
Normal file
3
1NSI/Evaluations/DS_2023-05-22/scripts/qcm_list_dico.py
Normal file
@@ -0,0 +1,3 @@
|
||||
t = [ {'id':1, 'age':23, 'sejour':'PEKIN'}, {'id':2, 'age':27, 'sejour':'ISTANBUL'},
|
||||
{'id':3, 'age':53, 'sejour':'LONDRES'}, {'id':4, 'age':41, 'sejour':'ISTANBUL'},
|
||||
{'id':5, 'age':62, 'sejour':'RIO'}, {'id':6, 'age':28, 'sejour':'ALGER'}]
|
11
1NSI/Evaluations/DS_2023-05-22/scripts/qcm_maxi.py
Normal file
11
1NSI/Evaluations/DS_2023-05-22/scripts/qcm_maxi.py
Normal file
@@ -0,0 +1,11 @@
|
||||
def maxi(t):
|
||||
m = t[0]
|
||||
for x in t:
|
||||
if x[1] >= m[1]:
|
||||
m = x
|
||||
return m
|
||||
|
||||
L = [ ('Alice', 17), ('Barnabé', 17),
|
||||
('Casimir', 17), ('Doriane', 17),
|
||||
('Emilien', 14), ('Fabienne', 16)
|
||||
]
|
Reference in New Issue
Block a user