suppression ancien fichier cours Pile & File, et ajout des sujets bacs NSI
This commit is contained in:
BIN
Sujet_bac/Pratique/BNS_2025/25-NSI-40/25-NSI-40.pdf
Normal file
BIN
Sujet_bac/Pratique/BNS_2025/25-NSI-40/25-NSI-40.pdf
Normal file
Binary file not shown.
36
Sujet_bac/Pratique/BNS_2025/25-NSI-40/25-NSI-40.py
Normal file
36
Sujet_bac/Pratique/BNS_2025/25-NSI-40/25-NSI-40.py
Normal file
@@ -0,0 +1,36 @@
|
||||
resultats = {
|
||||
'Dupont': {
|
||||
'DS1': [15.5, 4],
|
||||
'DM1': [14.5, 1],
|
||||
'DS2': [13, 4],
|
||||
'PROJET1': [16, 3],
|
||||
'DS3': [14, 4]
|
||||
},
|
||||
'Durand': {
|
||||
'DS1': [6 , 4],
|
||||
'DS2': [8, 4],
|
||||
'PROJET1': [9, 3],
|
||||
'IE1': [7, 2],
|
||||
'DS3': [12, 4]
|
||||
}
|
||||
}
|
||||
|
||||
def moyenne(nom, resultats):
|
||||
'''Renvoie la moyenne de l'élève nom, selon le dictionnaire
|
||||
resultats. Si nom n'est pas dans le dictionnaire,
|
||||
la fonction renvoie None.'''
|
||||
if nom in ...:
|
||||
notes = resultats[nom]
|
||||
if ...: # pas de notes
|
||||
return 0
|
||||
total_points = ...
|
||||
total_coefficients = ...
|
||||
for ... in notes.values():
|
||||
note, coefficient = valeurs
|
||||
total_points = total_points + ... * coefficient
|
||||
... = ... + coefficient
|
||||
return round( ... / total_coefficients, 1 )
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
Reference in New Issue
Block a user