From 73aec30c02e5dd879b59ffd116956583ac6912bd Mon Sep 17 00:00:00 2001 From: traetest Date: Mon, 13 Apr 2026 02:30:44 +0800 Subject: [PATCH] =?UTF-8?q?Add=20100=20=E5=AD=97=E7=AC=A6=E6=9E=81?= =?UTF-8?q?=E7=AE=80=E5=B0=8F=E6=B8=B8=E6=88=8F=20-=20=E7=8C=9C=E6=95=B0?= =?UTF-8?q?=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mini_game.py | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 mini_game.py diff --git a/mini_game.py b/mini_game.py new file mode 100644 index 0000000..a211172 --- /dev/null +++ b/mini_game.py @@ -0,0 +1,5 @@ +"""100 字符小游戏 - 猜数字""" +import random +n=random.randint(1,100);print("猜 1-100 的数字") +while True: + g=int(input("猜:"));print("大了!"if g>n else "小了!"if g