Neco 2019 Computer Studies Question 21
Practice objective / multiple choice question 21 from the 2019 Neco Computer Studies examination.
Consider the following Python code:\n\n```python\ncounter = 0\ndef foo(k):\n global counter\n for i in range(1, k+1):\n if i % 3 == 0:\n counter += i\n else:\n for j in range(i):\n if (j*i) % 4 == 0:\n counter += 1\n return counter\n\nx = foo(5)\ny = foo(3)\n```\n\nAfter executing the code, what is the value of the variable **y**?
Answer Options
About This Question
This is Neco 2019 Computer Studies Question 21. It is one of the objective questions from the 2019 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.