случайные-числа

Random text in Python

How to make random text in Python? So that it outputs only 1 variable out of two? For example, I take two variables with this ... , then role2, then again role1. I hope you explained it clearly. I am new to Python and I ask you to answer in more detail.

Output a list of words in random order without repetitions

I can't figure out the problem. Create a program that will output a list of words in random order. The screen should prin ... else: break print(empty_list) Screenshot of the execution result: Displays an empty list.

Random letters/numbers

I do not know how to make it so that only 2 different letters and 8 numbers are constantly written (also always different). I ... RndStr(10); if (textBox1.Text.Length > 0) ToXml(file_name, textBox1.Text); } } }

Write your own pseudorandom number generator

You need to write your own generator, because there is no way to add a library with a built-in one. Can you please suggest a ... little more complicated there. Has anyone ever had the experience of writing a primitive RNG without any built-in functions?

An array of random numbers with a range of values of a certain amount of php

The task is to create an array of random numbers of a certain length, with a given range of numbers, so that the sum has a ce ... urn $a; } else { return "Ошибка! Проверьте входные данные."; } } If someone finds a better one, I will be very happy!

Fill the array with random numbers without repetitions

I feel the expansion of madness. You need to get a unique array of N length from random numbers. var arr = [], a = ~~(Ma ... ask for the help of the community, including showing your best implementations, which you can consider as such, if you wish.

Give me a million! or where to get truly random numbers?

We need exactly one million random numbers. In principle, the accuracy of 1/256 suits me, so the question can be rephrased: w ... re are a million random numbers, and with an accuracy of not 1/256, but 2^-128, which is even too cool. ;) What do you think?

How to use the random function correctly in php?

Good afternoon. I'm teaching pcp, I ran into this problem: there is a script that generates 1 random number. But on the serve ... you quickly over-execute the script several times, the generator generates the same number. How do I get around this problem?

Select from a list of 400 random items

There is a list: List<string> list = new List<string>(); Its count is 10,000. You need to select 400 random (r ... t is, the probability that random can select the same element twice. How to avoid this and choose 400 random unique elements?

C# - Why is "Random" unstable?

There was a problem with the "Random" function. Sometimes it does not output the result. The bottom line: I made a "random" n ... 0, 100) == 100) { Console.WriteLine("4"); } else { Console.WriteLine("Error"); } string theEnd = Console.ReadLine();

C# How to implement output of random images in picturebox from ResorceFiles?

How to output a single image is clear. But how to implement the output of a random image in the same picturebox from resource ... se of ImageList and label, it works, but it beats the image quality and the size of max 256x256 points, i.e. it does not fit.

How to get a random number in a given interval in JavaScript

Task: you need to write a JavaScript function selfrandom(a,b:int):int that returns a random number in the interval from a to b for example: selfrandom(12,396); returns 254

How to connect random org to a website?

I want to connect a script for generating numbers to my site random org. They have a description of the API on their site, but I can't figure out how it works. Maybe someone can explain how it works. Thank you in advance

Opening a linear congruent pseudorandom number generator

For training purposes, I want to hack the simplest RNG. Even those who do not know about the linear congruent generator or ... 15245 is used in rand? Cracking a linear congruential generator Design of Cryptographically Strong Generator By Transforming

How is the authorization code generated on the receipt when paying with a plastic card?

How is the authorization code generated on the receipt when paying with a plastic card?

Rand () php randomly the number suggested for ModX

Good afternoon. There are 3 numbers, for example (20, 125, 25) You need to run a random number to get one of these numbers ... &parents=`20,125,25` ]] It is necessary to output one of the resources randomly instead of &parents

How to output random JS variables

I have a lot of different fruits. Orange, Banana, Apples... I need JS to randomly give each person a fruit. The code looks l ... ("Введите Ваше имя") document.write(name+" "+RandomFruit) How can I make RandomFruit substitute a random fruit instead of ?

Stochastic and probabilistic algorithms

What is the difference between stochastic and probabilistic an algorithm? Why are their definitions separated? Are they synonymous?

Generating random numbers without repetitions

I sit there, racking my brain , and it just doesn't work out. You need to create an array of random numbers in the range from ... cout << a[k]; } cout << "Для выхода из консоли нажмите любую клавишу"; _getch(); return 0; }

How to organize Random without repetitions in Java?

There are numbers from 0 to 23. How do I make it so that when you click on the button, a random number is generated that does not occur at least 2 more times?