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-34/25-NSI-34.pdf
Normal file
BIN
Sujet_bac/Pratique/BNS_2025/25-NSI-34/25-NSI-34.pdf
Normal file
Binary file not shown.
20
Sujet_bac/Pratique/BNS_2025/25-NSI-34/sujet-34.py
Normal file
20
Sujet_bac/Pratique/BNS_2025/25-NSI-34/sujet-34.py
Normal file
@@ -0,0 +1,20 @@
|
||||
from random import randint
|
||||
|
||||
def plus_ou_moins():
|
||||
nb_mystere = randint(1, ...)
|
||||
nb_test = int(input("Proposez un nombre entre 1 et 99 : "))
|
||||
compteur = ...
|
||||
|
||||
while nb_mystere != ... and compteur < ...:
|
||||
compteur = compteur + 1
|
||||
if nb_mystere ... nb_test:
|
||||
nb_test = int(input("Trop petit ! Testez encore : "))
|
||||
else:
|
||||
nb_test = int(input("Trop grand ! Testez encore : "))
|
||||
|
||||
if nb_mystere == nb_test:
|
||||
print ("Bravo ! Le nombre était ", ...)
|
||||
print("Nombre d'essais: ", ...)
|
||||
else:
|
||||
print ("Perdu ! Le nombre était ", ...)
|
||||
|
||||
Reference in New Issue
Block a user