Question 9
What is the output of the following snippet of code? Enter an integer as your answer. lst = [x for x in [1,0,-2]]
result = 0
for val in lst:
if val == 0:
result += 10
elif val < 0:
result += 5
elif val % 2 == 1:
result += 3
else:
result += 1
print(result)