MauryaHub PYQ Practice

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.
  1. Instructions has been mentioned above.
  2. 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]]
Source diagram or notation
  1. [[IMAGE:9dd29dd97ccdbf2b_2_3]]
    Source diagram or notation
  2. [[IMAGE:9dd29dd97ccdbf2b_2_4]]
    Source diagram or notation
  3. [[IMAGE:9dd29dd97ccdbf2b_2_5]]
    Source diagram or notation
  4. [[IMAGE:9dd29dd97ccdbf2b_2_6]]
    Source diagram or notation

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]]
Source diagram or notation
  1. [[IMAGE:9dd29dd97ccdbf2b_3_8]]
    Source diagram or notation
  2. [[IMAGE:9dd29dd97ccdbf2b_3_9]]
    Source diagram or notation
  3. [[IMAGE:9dd29dd97ccdbf2b_3_10]]
    Source diagram or notation
  4. [[IMAGE:9dd29dd97ccdbf2b_3_11]]
    Source diagram or notation

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]]
Source diagram or notation
  1. [[IMAGE:9dd29dd97ccdbf2b_3_13]] and [[IMAGE:9dd29dd97ccdbf2b_3_14]] both become [[IMAGE:9dd29dd97ccdbf2b_3_15]]
    Source diagram or notationSource diagram or notationSource diagram or notation
  2. [[IMAGE:9dd29dd97ccdbf2b_3_16]] changes the original list
    Source diagram or notation
  3. [[IMAGE:9dd29dd97ccdbf2b_4_17]] becomes [[IMAGE:9dd29dd97ccdbf2b_4_18]] while [[IMAGE:9dd29dd97ccdbf2b_4_19]] becomes [[IMAGE:9dd29dd97ccdbf2b_4_20]]
    Source diagram or notationSource diagram or notationSource diagram or notationSource diagram or notation
  4. [[IMAGE:9dd29dd97ccdbf2b_4_21]] returns a new sorted list
    Source diagram or notation

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?
Source diagram or notation
  1. [[IMAGE:9dd29dd97ccdbf2b_4_23]]
    Source diagram or notation
  2. [[IMAGE:9dd29dd97ccdbf2b_4_24]]
    Source diagram or notation
  3. [[IMAGE:9dd29dd97ccdbf2b_4_25]]
    Source diagram or notation
  4. [[IMAGE:9dd29dd97ccdbf2b_4_26]]
    Source diagram or notation

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]] .
Source diagram or notationSource diagram or notation
  1. [[IMAGE:9dd29dd97ccdbf2b_5_29]]
    Source diagram or notation
  2. [[IMAGE:9dd29dd97ccdbf2b_5_30]]
    Source diagram or notation
  3. [[IMAGE:9dd29dd97ccdbf2b_5_31]]
    Source diagram or notation
  4. [[IMAGE:9dd29dd97ccdbf2b_5_32]]
    Source diagram or notation

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?
Source diagram or notation
  1. [[IMAGE:9dd29dd97ccdbf2b_5_34]]
    Source diagram or notation
  2. [[IMAGE:9dd29dd97ccdbf2b_5_35]]
    Source diagram or notation
  3. [[IMAGE:9dd29dd97ccdbf2b_5_36]]
    Source diagram or notation
  4. [[IMAGE:9dd29dd97ccdbf2b_5_37]]
    Source diagram or notation

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]]
Source diagram or notation

    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]]
    Source diagram or notation

      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]]
      Source diagram or notation

        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]]
        Source diagram or notation

          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]] ?
          Source diagram or notationSource diagram or notation
          1. [[IMAGE:9dd29dd97ccdbf2b_9_44]]
            Source diagram or notation
          2. [[IMAGE:9dd29dd97ccdbf2b_9_45]]
            Source diagram or notation
          3. [[IMAGE:9dd29dd97ccdbf2b_9_46]]
            Source diagram or notation
          4. [[IMAGE:9dd29dd97ccdbf2b_9_47]]
            Source diagram or notation

          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?
          Source diagram or notationSource diagram or notationSource diagram or notationSource diagram or notation
          1. The final output becomes: [[IMAGE:9dd29dd97ccdbf2b_10_51]]
            Source diagram or notation
          2. [[IMAGE:9dd29dd97ccdbf2b_10_52]] becomes [[IMAGE:9dd29dd97ccdbf2b_10_53]]
            Source diagram or notationSource diagram or notation
          3. integer [[IMAGE:9dd29dd97ccdbf2b_10_54]] becomes [[IMAGE:9dd29dd97ccdbf2b_10_55]]
            Source diagram or notationSource diagram or notation
          4. integer [[IMAGE:9dd29dd97ccdbf2b_10_56]] becomes [[IMAGE:9dd29dd97ccdbf2b_10_57]]
            Source diagram or notationSource diagram or notation

          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]] ?
          Source diagram or notationSource diagram or notation
          1. [[IMAGE:9dd29dd97ccdbf2b_11_60]]
            Source diagram or notation
          2. [[IMAGE:9dd29dd97ccdbf2b_11_61]]
            Source diagram or notation
          3. [[IMAGE:9dd29dd97ccdbf2b_11_62]]
            Source diagram or notation
          4. [[IMAGE:9dd29dd97ccdbf2b_11_63]]
            Source diagram or notation

          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?
          Source diagram or notationSource diagram or notation

            A published solution is not available for this question yet.