import re
import time
# 变量设置
star = '★'
L = ('–' * 60 + '\n')
m = 'M I T: '
y = '游 客: '
end = 'exit'
i = (m + '游客您好!我是 M I T 科技所研发的人工智能系统1.8')
ask = ''
# 开始
print(m + '欢迎使用M I T 人工智能!')
time.sleep(0.7)
print(m + '如果想要结束服务,请你输入【exit】即可.\n' + star * 60)
time.sleep(0.7)
while ask != end:
# 判断输入
sentence = [".", "!", "?", "。", "!", "?"]
# list
sentencelen = len(sentence)
ask = input(L + m + '请输入你的问题~\n' + y)
if ask == end:
# 退出循环结束服务
break
list_nofindtime = 0
list_findtime = 0
for s in sentence:
list_nofindtime = list_nofindtime
list_findtime = list_findtime
if s in ask:
list_findtime += 1
if list_findtim