Response 15 / 5
target = input(...)
NumFound = 0
for score in scores:
if category[score] == "Junior" AND scores[score] >= target:
NumFound = NumFound + 1
print(...)
5/5 — NumFound is both initialised and incremented, the loop traverses the array, both conditions (category AND score) are present, and the output is concatenated correctly.
🔍 View original
Response 24 / 5
score = InputBox(...)
FOR index 0 TO 199 DO
IF performance(index) >= score THEN
qualifiers = qualifiers + 1
END IF
END FOR
msgbox(...)
4/5 — qualifiers is initialised and the loop is correct, but only the score condition is tested — there's no check that the competitor is actually a Junior, so one condition mark is lost.
🔍 View original
Response 34 / 5
min = int(input(...))
count = 0
for i in range(200):
if score[i] >= min:
count += 1
print(...)
4/5 — the same gap as Response 2: only the score condition is tested, with no category check, so one condition mark is lost even though everything else is correct.
🔍 View original
Response 42 / 5
qualifyingScore = InputBox(...)
count = 0
FOR i = 0 To 199
If category(i) = "Junior" AND scores(i) >= qualifyingScore Then
count = count + 1
End If
Next i
Msgbox("i & ...")
2/5 — count is initialised and incremented, the loop is correct, and both conditions are present, worth 2 of the 5 marks — but the final message outputs the loop variable i instead of count, so the output isn't correctly concatenated.
🔍 View original