A、str("120")
B、int("120")
C、float("120")
D、bool("120")
A、enemy < 50 and ammo_sufficient
B、enemy < 50 or ammo_sufficient
C、enemy > 50 or ammo_sufficient
D、not enemy < 50 and ammo_sufficient
A、squad.delete('魏和尚')
B、squad.pop(3)
C、squad.remove('魏和尚')
D、squad.drop('魏和尚')
for i in range(5): print(i)
A、1 2 3 4 5
B、0 1 2 3 4
C、0 1 2 3 4 5
D、1 2 3 4
def distribute(ammo, teams): ammo = ammo - teams * 10 return ammototal = 100used = distribute(total, 3)print(used)
A、70
B、100
C、30
D、0
A、print("出发地: %s, 预计到达时间: %d天" % (place, time))
B、print("出发地: " + place + ", 预计到达时间: " + str(time) + "天")
C、print("出发地:{}, 预计到达时间:{}天".format(place, time))
D、print("出发地:place, 预计到达时间:time天")
A、squad[1] 可以获取第二个元素"李战士 "
B、len(squad) 的结果是 4
C、squad.append('孙战士') 会在列表末尾添加新元素
D、squad.remove('王战士') 执行后, 列表长度变为 3
A、break 语句可以立即终止当前( 最内层) 循环
B、continue 语句可以跳过本次循环的剩余代码, 直接进入下一次循环
C、break 不可以在 while 循环中使用
D、continue 语句执行后, 循环会直接结束,不再进行后续迭代
A、集合中的元素是无序的,且不能重复。
B、villages.add(3) 不会改变集合的内容。
C、villages.remove(2) 执行时不会报错, 虽然 2 不在集合中。
D、len(villages) 的结果是 4。
A、递归调用时, 参数的值不能发生任何变化。
B、递归函数在每次调用时都会花费一定的时间。
C、递归函数在每次调用都会占用一定的内存空间。
D、递归函数必须包含一个或多个终止条件, 否则会无限递归。
34
2018
821
9p = int(input())r = int(input())print((p - 1) * 8 + r)
r123有效1abcd无效abc无效s = input()if len(s) >= 4 and s [0].isalpha(): print("有效")else: print("无效")
100 101200 7380 100money, limit = map(int, input().split())count = 0for bullet in range(1, money // 30 + 1): for grenade in range(1, money // 20 + 1): remaining = money - bullet * 30 - grenade * 20 if remaining <= 0 or remaining % 50 != 0: continue medicine = remaining // 50 if medicine >= 1 and bullet + grenade + medicine <= limit: count += 1print(count)
3 425 60 45 7030 55 80 3540 90 20 50
25-120-1
2 315 85 5070 40 95
15-1-1
3 330 40 5060 70 8090 95 100
-1-1-1
m, n = map(int, input().split())grid = [list(map(int, input().split())) for _ in range(m)]for column in range(n): min_value = min(grid [row] [column] for row in range(m)) if min_value < 30: print(min_value) else: print(-1)

