def prefer(preferReds, preferBlues, excludeReds, excludeBlues, count = 1): ls = [] for i in range(0, count): redBalls = BaseAlgorithm.geneRandomDistinctListPreferAndExclude(preferReds, excludeReds, WelfareLotteryRedBallCount, WelfareLotteryRedBallMinValue, WelfareLotteryRedBallMaxValue) blueBalls = BaseAlgorithm.geneRandomDistinctListPreferAndExclude(preferBlues, excludeBlues, WelfareLotteryBlueBallCount, WelfareLotteryBlueBallMinValue, WelfareLotteryBlueBallMaxValue) ls.append(redBalls + blueBalls) return ls
def random(count = 1): ls = [] for i in range(0, count): redBalls = BaseAlgorithm.geneRandomDistinctList(SuperLottoRedBallCount, SuperLottoRedBallMinValue, SuperLottoRedBallMaxValue) blueBalls = BaseAlgorithm.geneRandomDistinctList(SuperLottoBlueBallCount, SuperLottoBlueBallMinValue, SuperLottoBlueBallMaxValue) ls.append(redBalls + blueBalls) return ls
def random(count = 1): ls = [] for i in range(0, count): redBalls = BaseAlgorithm.geneRandomDistinctList(WelfareLotteryRedBallCount, WelfareLotteryRedBallMinValue, WelfareLotteryRedBallMaxValue) blueBalls = BaseAlgorithm.geneRandomDistinctList(WelfareLotteryBlueBallCount, WelfareLotteryBlueBallMinValue, WelfareLotteryBlueBallMaxValue) ls.append(redBalls + blueBalls) return ls
# coding=UTF-8 import BaseAlgorithm # const SuperLottoRedBallCount = 5 SuperLottoBlueBallCount = 2 SuperLottoTotalBallCount = SuperLottoRedBallCount + SuperLottoBlueBallCount SuperLottoRedBallMinValue = 1 SuperLottoRedBallMaxValue = 35 SuperLottoBlueBallminValue = 1 SuperLottoBlueBallMaxValue = 12 def random(count = 1) ls = [] for i in range(0, count): redBalls = BaseAlgorithm.geneRandomDistinctList(SuperLottoRedBallCount, SuperLottoRedBallMinValue, SuperLottoRedBallMaxValue) blueBalls = BaseAlgorithm.geneRandomDistinctList(SuperLottoBlueBallCount, SuperLottoBlueBallMinValue, SuperLottoBlueBallMaxValue) ls.append(redBalls + blueBalls) return ls