Neco 2017 Computer Studies Question 5

Practice objective / multiple choice question 5 from the 2017 Neco Computer Studies examination.

Neco 2017 Computer Studies Objective / Multiple Choice Medium Difficulty
Question 5 NECO • 2017 • COMPUTER_STUDIES • objective

Consider the following Python code:\n\n```python\ntotal = 0\nfor k in range(1, 7):\n if k % 2 == 0:\n total += k**2\n else:\n total -= k\nprint(total)\n```\n\nWhat value is printed when the program is executed?

Answer Options

A. 55
B. 45
Correct Answer C. 47
D. 41
Correct Answer
C
Correct Option:
47

About This Question

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