[Python] When using random.uniform(a,b), is b inclusive or exclusive?

Discussão em 'Python' iniciado por Stack, Outubro 1, 2024.

  1. Stack

    Stack Membro Participativo

    I was exploring the random module and can't find a correct answer to whether b is inclusive or exclusive in random.uniform(a, b).

    In a code like random.uniform(0, 1), some answers say 1 is included while others say 1 is never produced. What's the correct answer?

    Continue reading...

Compartilhe esta Página