APP Inventor实用课程之2:自动口算2.0(二)
2019-10-15 12:48
APP Inventor实用编程系列之2
自动口算2.0(二)
下面我来给大家介绍这个程序的核心部分。
点击边框调出视频工具条这里的代码比较复杂。
总结一下具体思想:
-
利用微数据库在两个屏幕之间传输用户选择的难度和计算方式的数据。
-
默认设计十个题目,每次出十个题目,每个题目都只有两个数字。
-
利用列表循环将正确答案和用户答案进行对比,将正确的题目清空,直接删除会出列表长度出错的问题,因此先不改变列表长度,用空值代替原来的题目,完成循环之后再进行清空。
-
循环多次,直到列表全部为空。
-
具体代码可以参考百度云的aia文件。
-
这里会截取一些代表性的代码。


所有变量

事件和过程总览

start training屏幕初始化细节1

start training屏幕初始化细节2

start training屏幕初始化细节3

产生题目过程代码

删除控制过程

清空已经对的题目过程

提交按钮做的事情

清空按钮清空用户填写的答案(简单)

一旦开始做题,计时器开始计时
--end--
声明:本文章由网友投稿作为教育分享用途,如有侵权原作者可通过邮件及时和我们联系删除:freemanzk@qq.com