用户:
SkyWatcher查看:5 回复:2 评论:5 创建时间:2021-07-16T15:25:17
【作品展示】

【作品介绍】
无
【作品源代码】
import requests
def ask_laoba():
question = input('我:')
return question
def laoba_answer(question):
print('老八应答:')
url = 'http://api.qingyunke.com/api.php?key=free&appid=0&msg='
res = requests.get(url+question)
html = res.text
answer = html.split('"')[-2]
return answer
for i in range(10):
qst = ask_laoba()
print(laoba_answer(qst))
print('老八要干饭了,一会再请你吃奥里给')
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn