用户:
弧光紫禁查看:0 回复:0 评论:0 创建时间:2020-10-24T19:23:54
【作品展示】

【作品介绍】
正道的光~~我要晒太(作)阳(品)~~
【作品源代码】
import easygui
import turtle
import time
import random
import codemao
__Pen = turtle.Pen()
# 加减乘除小能手
easygui.msgbox('你好,我是新水哥哥,你的好朋友!接下来,让我们一起闯荡这个计算世界吧!', '初来驾到', '你好,新水哥哥!')
__Pen.goto(0, 0)
turtle.bgcolor("#3333ff")
__Pen.pencolor("#ffffff")
__Pen.write('新水工作室 出品')
__Pen.goto(0, (-10))
__Pen.write('按右上角小×关闭')
turtle.done()
time.sleep(3)
答对个数 = 0
print('你好呀!')
time.sleep(1)
print('时间:', time.ctime())
time.sleep(1)
print('你想进行加法(写1)、减法(写2)、乘法(写3)还是除法(写4)')
guess = input('请选择')
temp = int(guess)
if (temp == 1):
print('欢迎来到加法世界!')
time.sleep(1)
print('下面,我会随机问你20题哦!')
time.sleep(1)
for __count in range(20):
a = random.randint(1, 100)
b = random.randint(1, 100)
print(a, '+', b, '=?')
guess = input('请回答')
temp = int(guess)
if (temp == a + b):
print('你答对了!')
答对个数 += 1
time.sleep(1)
else:
print('对不起,你答错了......')
time.sleep(1)
print('你答对了:', 答对个数, '题!')
if (temp == 2):
print('欢迎来到减法世界!')
time.sleep(1)
print('下面,我会随机问你20题哦!')
time.sleep(1)
for __count in range(20):
a = random.randint(1, 100)
b = random.randint(1, 100)
print(a, '-', b, '=?')
guess = input('请回答')
temp = int(guess)
if (temp == a - b):
print('你答对了!')
答对个数 += 1
time.sleep(1)
else:
print('对不起,你答错了......')
time.sleep(1)
print('你答对了:', 答对个数, '题!')
if (temp == 3):
print('欢迎来到乘法世界!')
time.sleep(1)
print('下面,我会随机问你20题哦!')
time.sleep(1)
for __count in range(20):
a = random.randint(1, 100)
b = random.randint(1, 100)
print(a, '*', b, '=?')
guess = input('请回答')
temp = int(guess)
if (temp == a * b):
print('你答对了!')
答对个数 += 1
time.sleep(1)
else:
print('对不起,你答错了......')
time.sleep(1)
print('你答对了:', 答对个数, '题!')
if (temp == 4):
print('欢迎来到除法世界!')
time.sleep(1)
print('下面,我会随机问你20题哦!')
time.sleep(1)
for __count in range(20):
a = random.randint(1, 100)
b = random.randint(1, 100)
print(a, '/', b, '=?')
guess = input('请回答')
temp = int(guess)
if (temp == a / b):
print('你答对了!')
答对个数 += 1
time.sleep(1)
else:
print('对不起,你答错了......')
time.sleep(1)
print('你答对了:', 答对个数, '题!')
image = codemao.Image("C:\\Users\\Administrator\\Pictures\\Saved Pictures\\timg.jpg")
image.open_image()
【提示】
部分含有Python第三方库相关内容的作品,在海龟编辑器网页端无法运行哦!如遇到这种情况,可以打开下面的链接,下载海龟编辑器客户端:
https://python.codemao.cn