Neco 2020 Computer Studies Question 41

Practice objective / multiple choice question 41 from the 2020 Neco Computer Studies examination.

Neco 2020 Computer Studies Objective / Multiple Choice Medium Difficulty
Question 41 NECO • 2020 • COMPUTER_STUDIES • objective

Consider the following Python program: ``` def mystery(x): total = 0 for i in range(1, x+1): if i % 2 == 0: total += i//2 else: total += 3*i + 1 return total print(mystery(5)) ``` What is the output printed by this program?

Answer Options

A. 35
B. 30
Correct Answer C. 33
D. 31
Correct Answer
C
Correct Option:
33

About This Question

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