Neco 2022 Computer Studies Question 26
Practice objective / multiple choice question 26 from the 2022 Neco Computer Studies examination.
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
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.