Neco 2020 Computer Studies Question 25

Practice objective / multiple choice question 25 from the 2020 Neco Computer Studies examination.

Neco 2020 Computer Studies Objective / Multiple Choice Hard Difficulty
Question 25 NECO • 2020 • COMPUTER_STUDIES • objective

The following Python function counts how many unordered pairs of numbers in a list have a sum divisible by 5: ```python def count_pairs(lst): count = 0 n = len(lst) for i in range(n): for j in range(i+1, n): if (lst[i] + lst[j]) % 5 == 0: count += 1 return count numbers = [12, 7, 3, 14, 8, 5] result = count_pairs(numbers) print(result) ``` What integer does the program print?

Answer Options

A. 6
B. 3
Correct Answer C. 4
D. 5
Correct Answer
C
Correct Option:
4

About This Question

This is Neco 2020 Computer Studies Question 25. It is one of the objective questions from the 2020 Neco Computer Studies examination.

Difficulty level: Hard .

Master the Exam!

You've seen a preview, but there are thousands more questions plus AI tutor to break down complex solutions.

Unlock Full Access Available for Android & Windows
Chat with Support