Le jeu de Monty-Hall
from random import*
def partie():
victoire = False
choix = randint(1,3)
if choix == 1:
choix2 = 3
if choix == 2 or choix == 3:
choix2 = 1
if choix2 == 1:
victoire = True
return victoire
nb_parties = 10
nb_victoires = 0
for i in range(0, nb_parties):
if partie():
nb_victoires = nb_victoires+1
print(nb_victoires/nb_parties)