猫史档案馆


【Python作品分享】人工喵【作品秀】

用户:SkyWatcherSkyWatcher查看:5 回复:2 评论:5 创建时间:2021-07-16T15:25:17


【作品展示】

center_image

 

【作品介绍】

 

【作品源代码】

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


回复

上一页1 页 / 共 1下一页
lsk666666lsk666666

这和谐的……

点赞0


评论


庄nnnn额庄nnnn额

人工报错

点赞0


评论