Skip to content

MacAndrews21/script_random

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

script_random

Little script to get X winners out of N participants.

Just type in the little scipt below in your python console, or rather start main.py in your python console. (At this time you get 5 winners in 30 participants)

import random
''' x = random.randint(start,end) ==> start <= x <= end '''
winner = []
start= 0 
participants = 30
winners = 5
while True:
    randomVariable = random.randint(start, participants)
    if randomVariable not in winner:
        winner.append(randomVariable)
    if len(winner) == winners:
        break

print len(winner), winner  

About

little script to get X winners of N participants.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages