Q2.Consider the following pseudocode. If at the end of execution, B=[3,5], then choose the correct code for procedure `checkCondition`.
```
A = [3, 8, 15, 6, 10, 5]
B = []
foreach number in A {
if(checkCondition(number)) {
B = B ++ [number]
}
}
```
Save
Check
Details
Q2
3 Aug 2025
Q2.Consider the following pseudocode. If at the end of execution, B=[3,5], then choose the correct code for procedure `checkCondition`.
```
A = [3, 8, 15, 6, 10, 5]
B = []
foreach number in A {
if(checkCondition(number)) {
B = B ++ [number]
}
}
```