From 479c015a6601a0410d4b9b81165190717f662da6 Mon Sep 17 00:00:00 2001 From: swangnice Date: Tue, 5 Aug 2025 11:52:18 +0800 Subject: [PATCH] first commit --- README.md | 3 +++ win.py | 15 +++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 README.md create mode 100644 win.py diff --git a/README.md b/README.md new file mode 100644 index 0000000..e90dc47 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# 双色球模拟器 + +用魔法打败魔法,用概率验证概率,为我那个爱买彩票的兄弟定制。 diff --git a/win.py b/win.py new file mode 100644 index 0000000..9da0bc9 --- /dev/null +++ b/win.py @@ -0,0 +1,15 @@ +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) \ No newline at end of file