第24932题 单选题
默认小猫角色执行给定程序,依次输入35、38、39、54、71后,小猫最后说出的内容是?

已知两个列表内容:

  • data1共5项:第1项5、第2项2、第3项13、第4项9、第5项8
  • data2共5项:第1项7、第2项19、第3项3、第4项6、第5项9 程序逻辑:
  1. 绿旗被点击后,初始化计数变量cnt=0,索引变量i=1
  2. 重复执行5次: a. 取data1第i项赋值给a,取data2第i项赋值给b b. 询问「a b = ?」并等待用户输入 c. 调用自定义函数func(a,b,用户输入值):函数逻辑为判断ab是否等于输入值,是则将全局变量ans设为true,否则设为false d. 若ans为true,cnt值加1 e. 索引i加1
  3. 循环结束后,小猫说出「答对了cnt道题目!」持续2秒
{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析