
Verifiable random choice (contest winner) algorithm - gliderShip
Hi guys, i need to pick a random winner for a contest from a list of phone numbers. Could somebody suggest a verifiable random algorithm. Something on the lines of &quot;Pick the winner based on the daily national lottery numbers&quot;. Does anybody know a free api endpoint for lottery numbers?
======
crispy2000
You could also look at the Bitcoin blockchain, e.g. on the blockchain.info web
site. There is a new block generated every 10 minutes or so. Some useful
fields in the block include the nonce (a 32-bit unsigned) or the block hash.
You can set a target time and say that the first block generated on x-date
(UTC) will be used. Blockchain.info and some others like it have a free API.

------
tylfin
One way: write a simple python script, ```import random phone_numbers = []
with open('list_of_phone_numbers.txt', 'r+') as file: for phone_number in
file: phone_numbers.append(phone_number)

random_pick = random.randint(0, len(phone_numbers)-1) print
phone_numbers[random_pick]```

