# Questions tagged as 'random'

1

## You are not generating the 1000 random numbers required

I'm developing a program in C that randomly generates a thousand numbers and that in the end appears the largest and smallest of them. For this, I'm using rand() . But I have a problem. When I run only less than 300 numbers are generate...
1

## How to get a random number in Kotlin?

How can I get a random number between two values? As ruby does with rand(0..n)
4

## How to generate random numbers for Draw? [closed]

I need to generate numbers for a promotion, these numbers should range from 0 to 99999. How can I distribute these numbers randomly and equitably, without repeating numbers already distributed?
4

## Generate random numbers that do not repeat

How can I generate a large string of random numbers that do not repeat? I have to generate 10 000 thousand numbers from 1 to 1 million and save to a file and they can not be repeated. Although the sequence is large, it has some repeating numb...
3

## What does it mean to assign Math.random () 0.5 to a variable?

What does this Math.random() > 0.5; mean in boolean ? Here is an example: class Pro { public static void main(String[] args) { int numero = 10; boolean[] array = new boolean[numero]; for(int i= 0;...
2

## How to get an item from a list randomly?

Suppose I have the following list: frutas = ['abacate', 'mamão', 'laranja', 'uva', 'pêra'] I need to capture one of these elements of list randomly. How would I do this in Python?
1

## Generate random numbers in Java

How to generate only numbers greater than 2? How to generate only numbers greater than 2 and the generated numbers have to be multiples of 3 (eg 3, 6, 9)? How to generate only numbers smaller than 10? How to generate only numbers smalle...
2

## Regex in dynamic string of X characters, in dynamic content

Next, I have a page that generates content scrambled with dynamic and non-dynamic strings, I need to get a dynamic value between the | tabs, it contains random data / strings that change when loading the page. The variable I want to get h...
1