Skip to content

Commit bbe3db8

Browse files
[投稿] 添加脚本: 豆沙包.py — by 潘奕辰
1 parent c77c062 commit bbe3db8

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import random
2+
3+
while True:
4+
a = input()
5+
if a == '你好' or a == '早上好' or a == '晚上好' or a == '中午好' or a[1] == '好':
6+
print('你好,我是你的聊天伙伴豆沙包,输入打开控制台,打开控制台')
7+
elif a == '再见' or a == '拜拜':
8+
print('再见')
9+
break
10+
elif a == '打开控制台':
11+
print('问普通疑问句前面加1问:,问是或否的问题前面要加2问:')
12+
else:
13+
if a[0] == '1':
14+
print('我不知道啊!')
15+
else:
16+
choices = ["yes", "no"]
17+
result = random.choice(choices)
18+
print(result)

0 commit comments

Comments
 (0)