suppression ancien fichier cours Pile & File, et ajout des sujets bacs NSI
This commit is contained in:
13
Sujet_bac/Pratique/BNS_2025/25-NSI-42/25-NSI-42.py
Normal file
13
Sujet_bac/Pratique/BNS_2025/25-NSI-42/25-NSI-42.py
Normal file
@@ -0,0 +1,13 @@
|
||||
def binaire(a):
|
||||
'''convertit un nombre entier a en sa representation
|
||||
binaire sous forme de chaine de caractères.'''
|
||||
if a == 0:
|
||||
return '0'
|
||||
bin_a = ...
|
||||
while ...:
|
||||
bin_a = ... + bin_a
|
||||
a = ...
|
||||
return bin_a
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user