I was wondering if I could make and random based on some specific condition which will be below I have that completed already what I need is that based on those condition python kinda randomly make new lists with the rule you will understand better in the code. `
import random
luck = 39999
def rand():
multiple_users = False
dice_dif = 20000
dice_luck_s = dice_dif / 2
dice_list = [1,2,3,4,5,6]
if multiple_users:
print ("multiple users")
else:
"""
# 1 2 3 4 5 6 == this are all the spots
dice_list = [2,1,1,3,3,6]
2 and 1 spot have a higher chance of being picked
and 6 spot have the lowest chance of being picked
in all conditions
"""
if luck <= dice_luck_s:
#
dice_list = [2,1,1,3,3,6] # I want it to arrange it with this format randomly
print("way less than")
elif luck > dice_luck_s and luck < dice_dif * 2:
dice_list = [1,2,3,4,5,6] # I want it to arrange it with this format randomly
print ("sitill less")
elif luck >= dice_dif * 2 and luck < dice_dif * 3:
dice_list = [2,1,3,6,4,6] # I want it to arrange it with this format randomly
print ("greaterthan = 2times")
elif luck >= dice_dif * 3 and luck < dice_dif * 5:
dice_list = [6,2,6,1,6,6] # I want it to arrange it with this format randomly
print ("greaterthan or = 3times")
elif luck >= dice_dif * 5:
dice_list = [6,1,6,6,6,6] # I want it to arrange it with this format randomly
print ("greaterthan 5times")
cal = dice_dif * luck / 100
# print(cal)
new_dif = cal
# pr
rand()`
THank you
Aucun commentaire:
Enregistrer un commentaire