猫史档案馆


【wood&turtle编辑器】超级AI代码对照

用户:猫绳没绑紧猫绳没绑紧查看:0 回复:0 评论:0 创建时间:2023-12-22T15:05:39


import turtle
import time
import random

__Pen = turtle.Pen()

#超级AI

__Pen.hideturtle()
turtle.bgcolor('#000000')
__Pen.pencolor("#ffffff")
__Pen.write('超级AI', font=('华文楷体', 48, 'normal'))
timu = ['小强坐在第5列第2行,他的座位用数对怎么表示?', '(  )间的距离处处相等。', '123×51=?', '345÷37=?', '236+89=?', '1981-679=?']
while True:
    try:
        p = turtle.textinput('超级AI', '请输入回复(输入“STOP”退出游戏)')
        if (p == 'STOP'):
            break
        else :
            print(p)
            if ('时间' in p):
                print(time.ctime())
            elif ('笑话' in p) :
                print('有一天奥特曼去上课,老师提问......')
                print('他一举手,老师就受伤了!')
            elif ('石头剪刀布' in p) :
                print('玩家A出了',random.choice(['石头', '剪刀', '布']),',玩家B出了',random.choice(['石头', '剪刀', '布']))
            elif ('你在哪' in p) :
                print('我在计算机里')
            elif ('你叫' in p) :
                print('我叫超级AI')
            elif ('出题' in p) :
                print(random.choice(timu))
            elif ('笨' in p) :
                print('我不笨')
            elif ('超级AI' in p) :
                print('版本:0.2.0')
                print('公测开始日期:2023年12月3日')
            else :
                print('这是什么意思')
    except:
        break


回复

上一页1 页 / 共 0下一页