from random import random def epreuve(p): if random()<=p: return True else: return False