import random
import requests
# 前区规则
def generate_numbers():
sections = [(1, 12), (13, 24), (25, 35)]
# 区间比例定义,偶尔出现一次的极端区间比未录入
ratios_options = [[2, 0, 3], [2, 1, 2], [2, 2, 1], [1, 2, 2], [1, 1, 3], [1, 3, 1], [3, 1, 1], [0, 3, 2],
[0, 2, 3], [2, 3, 0], [3, 2, 0]]
ratios_options_weights = [0.04, 0.13, 0.14, 0.13, 0.06, 0.05, 0.10, 0.06, 0.05, 0.03, 0.05]
ratios = random.choices(ratios_options, weights=ratios_options_weights, k=1)[0]
picked_numbers = []
total_sum = 0
# 奇偶比定义
even_ratio = [(2, 3), (3, 2), (4, 1), (1, 4), (0, 5), (5, 0)]
weights = [0.28, 0.31, 0.20, 0.13, 0.03, 0.05]
odd_even_ratio = random.choices(even_ratio, weights=weights, k=1)[0]
required_odds, required_evens = odd_even_ratio
total_sum_list = [(30, 39), (40, 49), (50, 59),
(60, 69), (70, 79), (80, 89),
[Python] 大乐透-根据近120期统计随机生成号码
最新推荐文章于 2024-08-23 09:32:52 发布