From de314c53ac5d7cc6803cc886a7c9141ad556a963 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=8A=E6=99=9A=E6=89=93=E8=80=81=E8=99=8E?= Date: Sun, 29 Mar 2026 19:08:54 +0800 Subject: [PATCH 1/2] =?UTF-8?q?[=E6=8A=95=E7=A8=BF]=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E8=84=9A=E6=9C=AC:=20=E7=AE=80=E6=98=93=E6=95=B0=E5=AD=A6?= =?UTF-8?q?=E8=AE=A1=E7=AE=97=E5=99=A8=20=E2=80=94=20by=20=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F=E5=91=98=E5=B0=8Fy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../scripts/basic/script_mnbnp2ee.py | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 script_library/scripts/basic/script_mnbnp2ee.py diff --git a/script_library/scripts/basic/script_mnbnp2ee.py b/script_library/scripts/basic/script_mnbnp2ee.py new file mode 100644 index 0000000..9ab62d9 --- /dev/null +++ b/script_library/scripts/basic/script_mnbnp2ee.py @@ -0,0 +1,54 @@ +def Menu(): #定义界面 + print(('-' * 20)) + print('简易数学计算器系统1.0') + print('1.加法运算 2.减法运算 3.乘法运算') + print('4.除法运算 0.退出系统') + print(('-' * 20)) + +def jia(): #定义加法函数 + a = float(input('请输入加数1:')) + b = float(input('请输入加数2:')) + c = a + b + print('和为:',c) + +def jian(): #定义减法函数 + d = float(input('请输入被减数:')) + e = float(input('请输入减数:')) + f = d - e + print('差为:',f) + +def cheng(): #定义乘法函数 + g = float(input('请输入乘数1:')) + h = float(input('请输入乘数2:')) + i = g * h + print('积为:',i) + +def chu(): #定义除法函数 + j = float(input('请输入被除数:')) + k = float(input('请输入除数:')) + l = j / k + print('商为:',l) + +def main(): #定义主控制台 + while True: + Menu() + key = input('请输入对应功能的数字:') + if key == '1': + jia() + elif key == '2' : + jian() + elif key == '3' : + cheng() + elif key == '4' : + chu() + elif key == '0' : + q = input('是否退出系统?(y or n):') + if q == 'y': + print('已退出系统') + break + else : + print('没有对应此数字的功能!') + +main() #调用主函数 + + From f818d2f0fb95acf4ba3071d5d31f9b296016b297 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BB=8A=E6=99=9A=E6=89=93=E8=80=81=E8=99=8E?= Date: Sun, 29 Mar 2026 19:08:55 +0800 Subject: [PATCH 2/2] =?UTF-8?q?[=E6=8A=95=E7=A8=BF]=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=20index.json:=20=E6=B7=BB=E5=8A=A0=20=E7=AE=80=E6=98=93?= =?UTF-8?q?=E6=95=B0=E5=AD=A6=E8=AE=A1=E7=AE=97=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script_library/index.json | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/script_library/index.json b/script_library/index.json index 530c846..eb67f79 100644 --- a/script_library/index.json +++ b/script_library/index.json @@ -1,7 +1,7 @@ { "format_version": 1, - "data_version": 38, - "updated": "2026-03-28T16:01:25.719Z", + "data_version": 39, + "updated": "2026-03-29T11:08:55.169Z", "announcement": null, "categories": [ { @@ -936,6 +936,29 @@ "updated": null, "status": "active", "lines": 227 + }, + { + "id": "script_mnbnp2ee", + "name": "简易数学计算器", + "name_en": "简易数学计算器", + "desc": "小学生做的代码,不喜勿喷,若有bug,及时在电子邮箱里反馈", + "desc_en": "小学生做的代码,不喜勿喷,若有bug,及时在电子邮箱里反馈", + "category": "basic", + "file": "scripts/basic/script_mnbnp2ee.py", + "thumbnail": null, + "version": 1, + "file_type": "py", + "author": "程序员小y", + "author_en": "程序员小y", + "tags": [ + "community" + ], + "requires": [], + "min_app_version": "1.5.0", + "added": "2026-03-29", + "updated": null, + "status": "active", + "lines": 55 } ] }