按键精灵脚本自动出口算题练习

上传人:子 文档编号:43819661 上传时间:2018-06-07 格式:DOC 页数:11 大小:14.90KB
返回 下载 相关 举报
按键精灵脚本自动出口算题练习_第1页
第1页 / 共11页
按键精灵脚本自动出口算题练习_第2页
第2页 / 共11页
按键精灵脚本自动出口算题练习_第3页
第3页 / 共11页
按键精灵脚本自动出口算题练习_第4页
第4页 / 共11页
按键精灵脚本自动出口算题练习_第5页
第5页 / 共11页
点击查看更多>>
资源描述

《按键精灵脚本自动出口算题练习》由会员分享,可在线阅读,更多相关《按键精灵脚本自动出口算题练习(11页珍藏版)》请在金锄头文库上搜索。

1、按键精灵脚本自动出口算题练习按键精灵脚本自动出口算题练习dim a,ba=InputBox(“输入加减法上限“)b = InputBox(“输入出题个数“)q=InputBox(“是 2 个数还是 3 个数相加减“)a=cint(a)b = cint(b)q = cint(q)Delay 500If q = 2 Then Call 子程序 1()End IfCall 子程序 2()Sub 子程序 1()Rem 开始Randomizex=int(Rnd * (a-1+1) + 1y=int(Rnd * (a-1+1) + 1f=int(Rnd * (1-0+1) + 1If f=1 Thenm=

2、“-“If x-ya ThenGoto 开始End ifGoto 打印 2End ifRem 打印 1L=L+1C = C + 1Rem 重新 1ge = cstr(c)ge1=“第“+ge+“题“jia1 = cstr(x)jia2 = cstr(y)shi=jia1+m+jia2+“=“t = InputBox(shi, ge1, “)t = cint(t)If x - y = t Then dui = dui + 1Else MessageBox “错误,请重新回答.“ Goto 重新 1End IfDelay 50If c = b Then MessageBox “本次答题结束,继续努

3、力哦.“EndScriptEnd ifGoto 开始Rem 打印 2L=L+1C = C + 1Rem 重新 2ge = cstr(c)ge1=“第“+ge+“题“jia1 = cstr(x)jia2 = cstr(y)shi=jia1+m+jia2+“=“t = InputBox(shi, ge1, “)t = cint(t)If x + y = t Then dui = dui + 1Else MessageBox “错误,请重新回答.“Goto 重新 2End IfDelay 50If c = b Then MessageBox “本次答题结束,继续努力哦.“EndScriptEnd i

4、fGoto 开始End SubSub 子程序 2()Rem 开始Randomizex=int(Rnd * (a-1+1) + 1y=int(Rnd * (a-1+1) + 1f=int(Rnd * (1-0+1) + 1z=int(Rnd * (a-1+1) + 1g=int(Rnd * (1-0+1) + 1If f=1 ThenIf x-ya ThenGoto 开始End ifGoto 打印 2End ifEnd IfIf f=2 Thenm=“+“End ifIf x+ya ThenGoto 开始End ifIf g=1 Theng=“-“If x+y-za ThenGoto 开始End

5、 ifGoto 打印 4End ifRem 打印 1L=L+1C = C + 1Rem 重新 1ge = cstr(c)ge1=“第“+ge+“题“jia1 = cstr(x)jia2 = cstr(y)jia3 = cstr(z)shi=jia1+m+jia2+g+jia3+“=“t = InputBox(shi, ge1, “)t = cint(t)If x - y -z= t Then dui = dui + 1Else MessageBox “错误,请重新回答.“ Goto 重新 1End IfDelay 50If c = b Then MessageBox “本次答题结束,继续努力哦

6、.“EndScriptEnd ifGoto 开始Rem 打印 2L=L+1C = C + 1Rem 重新 2ge = cstr(c)ge1=“第“+ge+“题“jia1 = cstr(x)jia2 = cstr(y)jia3 = cstr(z)shi=jia1+m+jia2+g+jia3+“=“t = InputBox(shi, ge1, “)t = cint(t)If x - y +z= t Then dui = dui + 1Else MessageBox “错误,请重新回答.“ Goto 重新 2End IfDelay 50If c = b Then MessageBox “本次答题结束

7、,继续努力哦.“EndScriptEnd ifGoto 开始Delay 50If c = b Then MessageBox “本次答题结束,继续努力哦.“EndScriptEnd ifGoto 开始Rem 打印 3L=L+1C = C + 1Rem 重新 3ge = cstr(c)ge1=“第“+ge+“题“jia1 = cstr(x)jia2 = cstr(y)jia3 = cstr(z)shi=jia1+m+jia2+g+jia3+“=“t = InputBox(shi, ge1, “)t = cint(t)If x + y -z= t Then dui = dui + 1Else Me

8、ssageBox “错误,请重新回答.“ Goto 重新 3End IfDelay 50If c = b Then MessageBox “本次答题结束,继续努力哦.“EndScriptEnd ifGoto 开始本脚本为电脑自动出口算题的脚本。把以下文本复制到按键精灵的源文件里,就可以运行了,口算运算上限自定,出题个数自定,加数减数的个数自定。 。 。Delay 50If c = b Then MessageBox “本次答题结束,继续努力哦.“EndScriptEnd ifGoto 开始Rem 打印 4L=L+1C = C + 1Rem 重新 4ge = cstr(c)ge1=“第“+ge+

9、“题“jia1 = cstr(x)jia2 = cstr(y)jia3 = cstr(z)shi=jia1+m+jia2+g+jia3+“=“t = InputBox(shi, ge1, “)t = cint(t)If x + y +z= t Then dui = dui + 1Else MessageBox “错误,请重新回答.“ Goto 重新 4End IfDelay 50If c = b Then MessageBox “本次答题结束,继续努力哦.“EndScriptEnd ifGoto 开始Delay 50If c = b Then MessageBox “本次答题结束,继续努力哦.“EndScriptEnd ifGoto 开始End Sub

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 生活休闲 > 科普知识

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号