def densuni(x,a,b): #densité sur [a,b] if (a<=x and x<=b): return(1/(b-a)) else: return(0)