Gce Model Questions Vol1 2022 Computer Studies Question 8

Practice objective / multiple choice question 8 from the 2022 Gce Model Questions Vol1 Computer Studies examination.

Gce Model Questions Vol1 2022 Computer Studies Objective / Multiple Choice Medium Difficulty
Question 8 GCE_MODEL_QUESTIONS_VOL1 • 2022 • COMPUTER_STUDIES • objective

Consider the following Python function: ```python def append_square(x, lst=[]): lst.append(x*x) return lst a = append_square(2) b = append_square(3) c = append_square(4, []) d = append_square(5) print(len(a), len(b), len(c), len(d)) ``` What is the output printed by the program?

Answer Options

A. 3 2 1 3
Correct Answer B. 3 3 1 3
C. 3 3 2 3
D. 2 2 1 2
Correct Answer
B
Correct Option:
3 3 1 3

About This Question

This is Gce Model Questions Vol1 2022 Computer Studies Question 8. It is one of the objective questions from the 2022 Gce Model Questions Vol1 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