Neco 2021 Computer Studies Question 27
Practice objective / multiple choice question 27 from the 2021 Neco Computer Studies examination.
Consider the following Python function:\n\n```python\ndef seq(n):\n a = 1\n b = 2\n total = 0\n for i in range(1, n+1):\n if i % 3 == 0:\n a = 1\n if i % 2 == 0:\n a = a + b\n else:\n b = a + b\n total += a + b\n return total\n```\n\nWhat value is printed when the function is called with `seq(5)`?
Answer Options
About This Question
This is Neco 2021 Computer Studies Question 27. It is one of the objective questions from the 2021 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.