1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Python] Create an array that sums to a specific number?

Discussão em 'Python' iniciado por Stack, Outubro 1, 2024 às 04:42.

  1. Stack

    Stack Membro Participativo

    I am using python. I am trying to create an array that sums to a certain number, but I want the array to be of a length of my choosing. Any idea on how to do this? For example, I want a array that sums to 1. So [.25,.25,.25,.25], but I want the numbers that are inside the array to be random, and I want my array to have a length of 98. Can someone please help?

    Continue reading...

Compartilhe esta Página