from random import * x = randint(1,100) e = int(input("Devine ? ")) n = 1 while e != x: if e < x: print("Plus grand") else: print("Plus petit") e = int(input("Essai ? ")) n = n + 1 print("Gagné en", n, "essais.")
Create, edit, and import your Python scripts
from random import * x = randint(1,100) e = int(input("Devine ? ")) n = 1 while e != x: if e < x: print("Plus grand") else: print("Plus petit") e = int(input("Essai ? ")) n = n + 1 print("Gagné en", n, "essais.")