Quiz1
Programming in Python · Quiz 1 · May 2026
← Course papers · Start practice / exam
Questions and published explanations below are available without starting a test. Some questions may not have a published solution yet.
Question 2 MCQ · 0.0 marks
**NAT → integer**
For all NAT questions in this exam, the answer will always be an integer and not a float value.
Instructions has been mentioned above.
This Instructions is just for a reference & not for an evaluation.
A published solution is not available for this question yet.
Question 3 MCQ · 3.0 marks
What is the output of the following code?
[[IMAGE:9dd29dd97ccdbf2b_2_2]]

[[IMAGE:9dd29dd97ccdbf2b_2_3]]

[[IMAGE:9dd29dd97ccdbf2b_2_4]]

[[IMAGE:9dd29dd97ccdbf2b_2_5]]

[[IMAGE:9dd29dd97ccdbf2b_2_6]]

A published solution is not available for this question yet.
Question 4 MCQ · 3.0 marks
What is the output of the following code?
[[IMAGE:9dd29dd97ccdbf2b_3_7]]

[[IMAGE:9dd29dd97ccdbf2b_3_8]]

[[IMAGE:9dd29dd97ccdbf2b_3_9]]

[[IMAGE:9dd29dd97ccdbf2b_3_10]]

[[IMAGE:9dd29dd97ccdbf2b_3_11]]

A published solution is not available for this question yet.
Question 5 MCQ · 3.0 marks
Which of the following statements is TRUE regarding the code below?
[[IMAGE:9dd29dd97ccdbf2b_3_12]]

[[IMAGE:9dd29dd97ccdbf2b_3_13]] and [[IMAGE:9dd29dd97ccdbf2b_3_14]] both become [[IMAGE:9dd29dd97ccdbf2b_3_15]]



[[IMAGE:9dd29dd97ccdbf2b_3_16]] changes the original list

[[IMAGE:9dd29dd97ccdbf2b_4_17]] becomes [[IMAGE:9dd29dd97ccdbf2b_4_18]] while [[IMAGE:9dd29dd97ccdbf2b_4_19]] becomes [[IMAGE:9dd29dd97ccdbf2b_4_20]]




[[IMAGE:9dd29dd97ccdbf2b_4_21]] returns a new sorted list

A published solution is not available for this question yet.
Question 6 MCQ · 4.0 marks
Consider the following code.
[[IMAGE:9dd29dd97ccdbf2b_4_22]]
What will be printed?

[[IMAGE:9dd29dd97ccdbf2b_4_23]]

[[IMAGE:9dd29dd97ccdbf2b_4_24]]

[[IMAGE:9dd29dd97ccdbf2b_4_25]]

[[IMAGE:9dd29dd97ccdbf2b_4_26]]

A published solution is not available for this question yet.
Question 7 MSQ · 4.0 marks
Consider the following code.
[[IMAGE:9dd29dd97ccdbf2b_5_27]]
Select all expressions that evaluate to [[IMAGE:9dd29dd97ccdbf2b_5_28]] .


[[IMAGE:9dd29dd97ccdbf2b_5_29]]

[[IMAGE:9dd29dd97ccdbf2b_5_30]]

[[IMAGE:9dd29dd97ccdbf2b_5_31]]

[[IMAGE:9dd29dd97ccdbf2b_5_32]]

A published solution is not available for this question yet.
Question 8 MSQ · 4.0 marks
Consider the following Python code.
[[IMAGE:9dd29dd97ccdbf2b_5_33]]
Which of the following statements will run without giving an error?

[[IMAGE:9dd29dd97ccdbf2b_5_34]]

[[IMAGE:9dd29dd97ccdbf2b_5_35]]

[[IMAGE:9dd29dd97ccdbf2b_5_36]]

[[IMAGE:9dd29dd97ccdbf2b_5_37]]

A published solution is not available for this question yet.
Question 9 NAT · 4.0 marks
What is the output of the following code?
[[IMAGE:9dd29dd97ccdbf2b_6_38]]

A published solution is not available for this question yet.
Question 10 NAT · 4.0 marks
What is the output of the following code?
[[IMAGE:9dd29dd97ccdbf2b_6_39]]

A published solution is not available for this question yet.
Question 11 NAT · 4.0 marks
What is the output of the following code?
[[IMAGE:9dd29dd97ccdbf2b_7_40]]

A published solution is not available for this question yet.
Question 12 NAT · 3.0 marks
What is the output of the following code?
[[IMAGE:9dd29dd97ccdbf2b_8_41]]

A published solution is not available for this question yet.
Question 13 MCQ · 4.0 marks
[[IMAGE:9dd29dd97ccdbf2b_9_42]]
Note: isinstance(val, datatype) returns True if val is of object of type 'datatype' and False,
otherwise.
Based on the above data, answer the given subquestions.
What is the value of [[IMAGE:9dd29dd97ccdbf2b_9_43]] ?


[[IMAGE:9dd29dd97ccdbf2b_9_44]]

[[IMAGE:9dd29dd97ccdbf2b_9_45]]

[[IMAGE:9dd29dd97ccdbf2b_9_46]]

[[IMAGE:9dd29dd97ccdbf2b_9_47]]

A published solution is not available for this question yet.
Question 14 MSQ · 3.0 marks
[[IMAGE:9dd29dd97ccdbf2b_9_42]]
Note: isinstance(val, datatype) returns True if val is of object of type 'datatype' and False,
otherwise.
Based on the above data, answer the given subquestions.
Suppose the following condition inside the transform() function:
[[IMAGE:9dd29dd97ccdbf2b_10_48]]
is replaced with
[[IMAGE:9dd29dd97ccdbf2b_10_49]]
For the given input
[[IMAGE:9dd29dd97ccdbf2b_10_50]]
which of the following statements will become TRUE?




The final output becomes:
[[IMAGE:9dd29dd97ccdbf2b_10_51]]

[[IMAGE:9dd29dd97ccdbf2b_10_52]] becomes [[IMAGE:9dd29dd97ccdbf2b_10_53]]


integer [[IMAGE:9dd29dd97ccdbf2b_10_54]] becomes [[IMAGE:9dd29dd97ccdbf2b_10_55]]


integer [[IMAGE:9dd29dd97ccdbf2b_10_56]] becomes [[IMAGE:9dd29dd97ccdbf2b_10_57]]


A published solution is not available for this question yet.
Question 15 MCQ · 4.0 marks
[[IMAGE:9dd29dd97ccdbf2b_11_58]]
Based on the above data, answer the given subquestions.
What is the value of [[IMAGE:9dd29dd97ccdbf2b_11_59]] ?


[[IMAGE:9dd29dd97ccdbf2b_11_60]]

[[IMAGE:9dd29dd97ccdbf2b_11_61]]

[[IMAGE:9dd29dd97ccdbf2b_11_62]]

[[IMAGE:9dd29dd97ccdbf2b_11_63]]

A published solution is not available for this question yet.
Question 16 NAT · 3.0 marks
[[IMAGE:9dd29dd97ccdbf2b_11_58]]
Based on the above data, answer the given subquestions.
How many times is the condition [[IMAGE:9dd29dd97ccdbf2b_11_64]] evaluated?


A published solution is not available for this question yet.