Python Certification Exam Preparation Set 65

What is the output of below program?


Options are :

  • 24000
  • No output
  • 432 (Correct)
  • 430

Answer :432

Which of the following functions will not result in an error when no arguments are passed to it?


Options are :

  • all()
  • float() (Correct)
  • min()
  • divmod()

Answer :float()

Python Certification Exam Preparation Set 7

What is the output of the functions shown below?


Options are :

  • A Error
  • Error Error
  • A 65
  • Error 65 (Correct)

Answer :Error 65

Which of the following functions does not necessarily accept only iterables as arguments?


Options are :

  • chr() (Correct)
  • max()
  • enumerate()
  • all()

Answer :chr()

What is the output of the following code?


Options are :

  • 45 56
  • Syntax Error
  • 10 20
  • 10 56 (Correct)

Answer :10 56

Python Certification Exam Preparation Set 35

What is the output of the following snippet of code?


Options are :

  • 'Numbers': {1: 56, 3: 7}
  • {'Numbers': {1: 56, 3: 7}, 'Letters': {4: 'B'}} (Correct)
  • {'Numbers': {1: 56}, 'Letters': {4: 'B'}}
  • Error, dictionary in a dictionary can't exist

Answer :{'Numbers': {1: 56, 3: 7}, 'Letters': {4: 'B'}}

What is the output of below program?


Options are :

  • None of the mentioned
  • Arthur
  • Sir Arthur (Correct)
  • Arthur Sir

Answer :Sir Arthur

What are the outcomes of the function shown below?


Options are :

  • 9
  • 6
  • Error
  • 1 (Correct)

Answer :1

Python Practice Test MCQ Certified Go from 0 to Expert hero Set 28

What is the output of this program?


Options are :

  • 6 9 12
  • 9 27 81 (Correct)
  • 27 81 343
  • None of the mentioned

Answer :9 27 81

What is the output of the following piece of code?


Options are :

  • 4
  • An exception is thrown
  • 1
  • 5 (Correct)

Answer :5

What is the output of the following snippet of code?


Options are :

  • 6 (Correct)
  • 3
  • An exception is thrown
  • 2

Answer :6

Python Certification Exam Preparation Set 3

What is the output of the following piece of code?


Options are :

  • Tuple
  • String
  • Dictionary (Correct)
  • An exception is thrown

Answer :Dictionary

The function divmod(a,b), where both 'a' and 'b' are integers is evaluated as:


Options are :

  • (a//b, a%b) (Correct)
  • (a/b, a%b)
  • (a//b, a*b)
  • (a%b, a//b)

Answer :(a//b, a%b)

What is the output of the following function?


Options are :

  • 1
  • Error
  • 2j
  • 1+2j (Correct)

Answer :1+2j

Python Certification Exam Preparation Set 51

What is the output of this program?


Options are :

  • 9997
  • 9999
  • 9996 (Correct)
  • None of the mentioned

Answer :9996

What is the output of the following snippet of code?


Options are :

  • Exception is thrown
  • {'b': [2], 'a': [3]}
  • {'b': [2, 3, 4], 'a': 1} (Correct)
  • {'b': [2], 'a': 1}

Answer :{'b': [2, 3, 4], 'a': 1}

What is the output of the following code?


Options are :

  • 3 2 (Correct)
  • 1 2
  • An exception is thrown because of conflicting values
  • 3 3

Answer :3 2

Python Certification Exam Preparation Set 7

Python supports the creation of anonymous functions at runtime, using a construct called __________


Options are :

  • Lambda (Correct)
  • anonymous
  • pi
  • None of the mentioned

Answer :Lambda

What is the output of the function complex() ?


Options are :

  • 0
  • 0j (Correct)
  • 0+0j
  • Error

Answer :0j

What is the output of the function shown below?


Options are :

  • 0xF
  • 0Xf
  • 0xf (Correct)
  • f

Answer :0xf

Python Practice Test MCQ Certified Go from 0 to Expert hero Set 18

What is the output of the functions shown below?


Options are :

  • Error Junk value
  • –inf inf (Correct)
  • Error Error
  • –infinity inf

Answer :–inf inf

What is the output of the following code?


Options are :

  • An exception is executed
  • Infinite loop
  • zz
  • zzz (Correct)

Answer :zzz

The output of the function:

(Note that the number of blank spaces before the number is 5)


Options are :

  • Error
  • -12345.000000000…. (infinite decimal places)
  • -12345.0 (5 blank spaces before the number)
  • -12345.0 (Correct)

Answer :-12345.0

Python Practice Test MCQ Certified Go from 0 to Expert hero Set 7

Lambda contains block of statements


Options are :

  • True
  • False (Correct)

Answer :False

What is the output of the functions shown below?


Options are :

  • 0.001 200
  • 0.001 2000.0 (Correct)
  • 3.00 300
  • Error 2003

Answer :0.001 2000.0

What is the output of the following piece of code?


Options are :

  • {3:1}
  • Counter({4: 3, 2: 2, 3: 1})
  • {4:3}
  • [(4, 3)]. (Correct)

Answer :[(4, 3)].

Python Certification Exam Preparation Set 27

What is the output of the following piece of code?


Options are :

  • {1,2,3,4}
  • Counter({4: 3, 1: 2, 3: 2, 2: 1}) (Correct)
  • Counter({4, 1, 3, 2})
  • {4: 3, 1: 2, 3: 2, 2: 1}

Answer :Counter({4: 3, 1: 2, 3: 2, 2: 1})

What is the output of the following piece of code?


Options are :

  • Counter({2: 2, 3: 1, 4: 1})
  • Counter({4: 1})
  • Counter({3: 2})
  • Counter({3: 3, 2: 2, 4: 2}) (Correct)

Answer :Counter({3: 3, 2: 2, 4: 2})

What is the output of the following code?


Options are :

  • An exception is thrown
  • 1
  • Nothing is displayed
  • 0 (Correct)

Answer :0

Python Certification Exam Preparation Set 26

What is the output of the function shown below?


Options are :

  • [(0, 2), (1, 3)] (Correct)
  • Error
  • [(1, 2), (2, 3)]
  • [(2, 3)]

Answer :[(0, 2), (1, 3)]

Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions