Neco 2018 Computer Studies Question 23

Practice objective / multiple choice question 23 from the 2018 Neco Computer Studies examination.

Neco 2018 Computer Studies Objective / Multiple Choice Hard Difficulty
Question 23 NECO • 2018 • COMPUTER_STUDIES • objective

Consider the following Python function intended to compute the sum of the squares of all even numbers less than \(n\) that are also multiples of 3: ```python def sum_even_mult3(n): total = 0 for i in range(n): if i % 2 == 0 and i % 3 == 0: total += i ** 2 return total ``` The function contains a logical error. After correcting the error, what value does the function return when called with \(n = 30\)?

Answer Options

Correct Answer A. 1080
B. 900
C. 720
D. 1260
Correct Answer
A
Correct Option:
1080

About This Question

This is Neco 2018 Computer Studies Question 23. It is one of the objective questions from the 2018 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