From e56ea41a6c52106812a7bfdc4b33f8ed923781c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=BB=AB=E7=BB=87=E6=A2=A6?= Date: Fri, 14 Jul 2023 16:29:20 +0000 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E4=B8=A4=E8=A1=8CPython=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E5=AE=9E=E7=8E=B0=E7=9A=84AI=20=E7=94=A8=E4=B8=A4?= =?UTF-8?q?=E8=A1=8CPython=E4=BB=A3=E7=A0=81=E5=AE=9E=E7=8E=B0=E7=9A=84AI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 学AI的和不学AI的都沉默了 Signed-off-by: 绫织梦 --- python/AI.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 python/AI.py diff --git a/python/AI.py b/python/AI.py new file mode 100644 index 0000000..0ad52ec --- /dev/null +++ b/python/AI.py @@ -0,0 +1,23 @@ +''' +用两行Python代码实现的AI + +''' + +while True: + print("AI:"+input('#:').replace('你', '我'). replace('吗', ''). replace('?', '!').replace('?','!'),end='\n\n') + + +''' +#:你是AI吗? +AI:我是AI! + +#:你能听懂我说话吗? +AI:我能听懂我说话! + +#:你能看懂中文吗? +AI:我能看懂中文! + +#:你是小黑子吗? +AI:我是小黑子! + +''' \ No newline at end of file -- Gitee