Neco 2022 Computer Studies Question 26

Practice objective / multiple choice question 26 from the 2022 Neco Computer Studies examination.

Neco 2022 Computer Studies Objective / Multiple Choice Medium Difficulty
Question 26 NECO • 2022 • COMPUTER_STUDIES • objective

The following Python program is intended to compute the sum of the squares of all even integers that are strictly less than a positive integer \(n\) entered by the user. ``` n = int(input()) i = 2 total = 0 while i < n: total = total + i*i i = i + 1 print(total) ``` However, the program contains an error that prevents it from giving the intended result. Identify the error, write the corrected line, and then state the value printed when the corrected program is run with input \(10\).

Answer Options

A. 284
B. 100
Correct Answer C. 120
D. 140
Correct Answer
C
Correct Option:
120

About This Question

This is Neco 2022 Computer Studies Question 26. It is one of the objective questions from the 2022 Neco Computer Studies examination.

Difficulty level: Medium .

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