其他分享
首页 > 其他分享> > deqin -与机器人对话

deqin -与机器人对话

作者:互联网

import requests
import easygui

for i in range(3):
    talk = easygui.enterbox("你想问什么?")
    url = 'http://www.tuling123.com/openapi/api?key=d8dee202a87940bd866332938dd9ec52&info=%s'%talk
    er = requests.get(url)
    anwser = er.text
    an_list = anwser.split('"')
    easygui.msgbox(an_list[5])
# file ----》 setting ---》  projectXXX   ---》 interpreter ---》 +
import easygui

# 显示文字  message信息  box 盒子
# 第一个参数,标题
easygui.msgbox("欢迎来到虚拟世界", "人工智障机器人", "进入", "ssr.gif")
# 输入文字   enter 输入  box 盒子
name = easygui.enterbox("你叫什么名字?","人工智障机器人", "钢铁侠" )
# 交互
easygui.msgbox("你好%s"%name)




少儿编程侯老师 发布了375 篇原创文章 · 获赞 19 · 访问量 1万+ 私信 关注

标签:easygui,机器人,deqin,anwser,对话,import,msgbox,er
来源: https://blog.csdn.net/houlaos/article/details/104460123