#699. 初赛测试题(小高)4
初赛测试题(小高)4
选择题
- 2026年智能科技展览会上,小明用Python计算参观人数增长,执行代码
visitors = 1200; visitors += 350; print(visitors)后,输出结果是() {{ select(1) }}
12001550850350
- 定义未来科技列表
future_tech = ["人工智能", "量子计算", "太空旅游", "脑机接口"],执行print(len(future_tech))的输出结果是() {{ select(2) }}
3456
- 2026年智能机器人编程课,小华编写代码计算机器人行走距离:
,输出结果是() {{ select(3) }}speed = 15; time = 8; distance = speed * time; print(distance)
120237158
- 执行代码
的输出结果是() {{ select(4) }}temperature = 28; if temperature > 25: print("天气炎热"); else: print("天气凉爽")
天气炎热天气凉爽2825
- 2026年智能城市交通系统,定义列表
traffic_light = ["红", "黄", "绿"],执行print(traffic_light[2])的输出是() {{ select(5) }}
红黄绿报错
- 计算2026年科技夏令营费用,每人850元,25人参加,以下代码正确的是() {{ select(6) }}
print(850 + 25)print(850 * 25)print(850 / 25)print(850 - 25)
- 执行代码
score = 85; if score >= 90: print("优秀"); elif score >= 75: print("良好"); else: print("加油")
的输出结果是() {{ select(7) }}
优秀良好加油85
- 2026年无人机编程比赛,小红编写循环代码:
for i in range(1, 6): print(i * 2),第一次输出的数字是() {{ select(8) }}
12610
- 定义变量
price = "199",要计算购买3个智能手表的总价,正确的代码是() {{ select(9) }}
print(price * 3)print(int(price) * 3)print(price + 3)print(3 * price)
- 2026年智能农场,传感器监测土壤湿度,执行代码
的输出是() {{ select(10) }}humidity = 65; if humidity < 30: print("需要浇水"); elif humidity > 80: print("水分过多"); else: print("湿度适宜")
需要浇水水分过多湿度适宜65
- 列表
robots = ["扫地机器人", "送餐机器人", "陪伴机器人"],执行robots.append("教学机器人"); print(len(robots))的输出结果是() {{ select(11) }}
3456
- 2026年智能图书馆,计算借阅天数:
,输出结果是() {{ select(12) }}start_day = 5; end_day = 18; days = end_day - start_day; print(days)
1323185
- 执行代码
的输出结果是() {{ select(13) }}total = 0; for i in range(1, 6): total += i; print(total)
5101520
- 2026年智能健康手环记录步数,定义变量
steps = 8500,判断是否达到每日目标(8000步)的正确代码是() {{ select(14) }}
if steps = 8000: print("达标")if steps == 8000: print("达标")if steps >= 8000: print("达标")if steps > 8000: print("达标")
- 定义字符串
tech = "2026人工智能", 执行print(tech[4:8])的输出结果是() {{ select(15) }}
2026人工人工智能智能
判断题
- 在Python中,
=用于赋值,==用于比较两个值是否相等 {{ select(16) }}
- 对
- 错
- 执行代码
x = 10; y = 5; print(x / y)会输出2.0,因为除法运算结果是浮点数 {{ select(17) }}
- 对
- 错
- 列表的索引从0开始,所以
list[0]表示列表的第一个元素 {{ select(18) }}
- 对
- 错
- 执行代码
name = "小明"; age = 12; print(name + age)会成功输出"小明12" {{ select(19) }}
- 对
- 错
range(1, 10)会生成从1到9的数字序列,不包含10 {{ select(20) }}
- 对
- 错