Q11.Consider the following snippet of code. What will the output be?
```
val = 0
L = [9, 1, 5, 4, 2]
temp = []
for num in L:
if num % 2 != 0:
temp.append(num)
else:
val += num
print(len(temp) * val)
```
Save
Check
Details
Q11
23 Feb 2025
Q11.Consider the following snippet of code. What will the output be?
```
val = 0
L = [9, 1, 5, 4, 2]
temp = []
for num in L:
if num % 2 != 0:
temp.append(num)
else:
val += num
print(len(temp) * val)
```