#699. 初赛测试题(小高)4

初赛测试题(小高)4


选择题

  1. 2026年智能科技展览会上,小明用Python计算参观人数增长,执行代码visitors = 1200; visitors += 350; print(visitors)后,输出结果是() {{ select(1) }}
  • 1200
  • 1550
  • 850
  • 350
  1. 定义未来科技列表future_tech = ["人工智能", "量子计算", "太空旅游", "脑机接口"],执行print(len(future_tech))的输出结果是() {{ select(2) }}
  • 3
  • 4
  • 5
  • 6
  1. 2026年智能机器人编程课,小华编写代码计算机器人行走距离:
    speed = 15; 
    time = 8; 
    distance = speed * time; 
    print(distance)
    
    ,输出结果是() {{ select(3) }}
  • 120
  • 23
  • 7
  • 158
  1. 执行代码
    temperature = 28; 
    if temperature > 25: 
      print("天气炎热"); 
    else: 
      print("天气凉爽")
    
    的输出结果是() {{ select(4) }}
  • 天气炎热
  • 天气凉爽
  • 28
  • 25
  1. 2026年智能城市交通系统,定义列表traffic_light = ["红", "黄", "绿"],执行print(traffic_light[2])的输出是() {{ select(5) }}
  • 绿
  • 报错
  1. 计算2026年科技夏令营费用,每人850元,25人参加,以下代码正确的是() {{ select(6) }}
  • print(850 + 25)
  • print(850 * 25)
  • print(850 / 25)
  • print(850 - 25)
  1. 执行代码
    score = 85; 
    if score >= 90: 
      print("优秀"); 
    elif score >= 75: 
      print("良好"); 
    else: 
      print("加油")
    

的输出结果是() {{ select(7) }}

  • 优秀
  • 良好
  • 加油
  • 85
  1. 2026年无人机编程比赛,小红编写循环代码:for i in range(1, 6): print(i * 2),第一次输出的数字是() {{ select(8) }}
  • 1
  • 2
  • 6
  • 10
  1. 定义变量price = "199",要计算购买3个智能手表的总价,正确的代码是() {{ select(9) }}
  • print(price * 3)
  • print(int(price) * 3)
  • print(price + 3)
  • print(3 * price)
  1. 2026年智能农场,传感器监测土壤湿度,执行代码
    humidity = 65; 
    if humidity < 30: 
      print("需要浇水"); 
    elif humidity > 80: 
      print("水分过多"); 
    else: 
      print("湿度适宜")
    
    的输出是() {{ select(10) }}
  • 需要浇水
  • 水分过多
  • 湿度适宜
  • 65
  1. 列表robots = ["扫地机器人", "送餐机器人", "陪伴机器人"],执行robots.append("教学机器人"); print(len(robots))的输出结果是() {{ select(11) }}
  • 3
  • 4
  • 5
  • 6
  1. 2026年智能图书馆,计算借阅天数:
    start_day = 5; 
    end_day = 18; 
    days = end_day - start_day; 
    print(days)
    
    ,输出结果是() {{ select(12) }}
  • 13
  • 23
  • 18
  • 5
  1. 执行代码
    total = 0; 
    for i in range(1, 6): 
      total += i; 
    print(total)
    
    的输出结果是() {{ select(13) }}
  • 5
  • 10
  • 15
  • 20
  1. 2026年智能健康手环记录步数,定义变量steps = 8500,判断是否达到每日目标(8000步)的正确代码是() {{ select(14) }}
  • if steps = 8000: print("达标")
  • if steps == 8000: print("达标")
  • if steps >= 8000: print("达标")
  • if steps > 8000: print("达标")
  1. 定义字符串tech = "2026人工智能", 执行print(tech[4:8])的输出结果是() {{ select(15) }}
  • 2026
  • 人工
  • 人工智能
  • 智能

判断题

  1. 在Python中,=用于赋值,==用于比较两个值是否相等 {{ select(16) }}
  1. 执行代码x = 10; y = 5; print(x / y)会输出2.0,因为除法运算结果是浮点数 {{ select(17) }}
  1. 列表的索引从0开始,所以list[0]表示列表的第一个元素 {{ select(18) }}
  1. 执行代码name = "小明"; age = 12; print(name + age)会成功输出"小明12" {{ select(19) }}
  1. range(1, 10)会生成从1到9的数字序列,不包含10 {{ select(20) }}