Files

15 lines
410 B
Python
Raw Permalink Normal View History

2025-08-05 11:52:18 +08:00
import random
def generate_double_chromosphere():
red_balls = random.sample(range(1, 34), 6)
red_balls.sort()
blue_ball = random.randint(1, 16)
return red_balls, blue_ball
def shake(times=1):
for i in range(1, times + 1):
reds, blue = generate_double_chromosphere()
print(f"{i}次摇号结果:红球 {reds} | 蓝球 [{blue}]")
if __name__ == "__main__":
shake(5)