小明的妈妈在超市里买了一些商品,商品的价格放在列表里,现在超市对商品进行打折处理,请运行如下代码输出结果?( )
def fun(lst):
total = 0
for x in lst:
if x >= 100:
total += x * 0.5
else:
total += x
return total
goods = [140, 90, 120, 60]
print(fun(goods))
390.0
280.0
260.0
150.0