Python Certification Exam Preparation Set 27

What is the output when we execute list("hello")?     


Options are :

  • ['h', 'e', 'l', 'l', 'o'] (Correct)
  • ['hello']
  • ['llo']
  • ['olleh']

Answer :['h', 'e', 'l', 'l', 'o']

Suppose listExample is ['h','e','l','l','o'], what is len(listExample)? 


Options are :

  • 5 (Correct)
  • 4
  • None
  • Error

Answer :5

What will be the output of the following Python code?


Options are :

  • none of the mentioned (Correct)
  • ['AB', 'CD']
  • ['ab', 'cd']
  • ['ab', 'cd', 'AB', 'CD']

Answer :none of the mentioned

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

What will be the output of the following Python code snippet?


Options are :

  • no output
  • error
  • morning
  • hello (Correct)

Answer :hello

Which of these about a set is not true?   


Options are :

  • Data type with unordered values
  • Mutable data type
  • Allows duplicate values
  • Immutable data type (Correct)

Answer :Immutable data type

Which of the following Boolean expressions is not logically equivalent to the other three?


Options are :

  • not(-6<10 or-6==10)
  • -6>=0 and -6<=10
  • not(-6<0 or-6>10)
  • not(-6>10 or-6==10) (Correct)

Answer :not(-6>10 or-6==10)

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

What will be the output of the following Python code?


Options are :

  • None
  • Error
  • False (Correct)
  • True

Answer :False

What will be the output of the following Python code?


Options are :

  • [1, 4, 8] (Correct)
  • (1, 4, 8)
  • [1, 2, 4, 3, 8, 9]
  • [2, 3, 9]

Answer :[1, 4, 8]

What will be the output of the following Python code?


Options are :

  • Error (Correct)
  • 2
  • 1
  • 5

Answer :Error

Python Certification Exam Preparation Set 32

What will be the output of the following Python code?


Options are :

  • (2, 4, 3)
  • (1, 2, 4)
  • (2, 4) (Correct)
  • (1, 2)

Answer :(2, 4)

What will be the output of the following Python code snippet?


Options are :

  • 56 blank spaces after get-job
  • 56 blank spaces before get-job (Correct)
  • 56 blank spaces before get-job
  • no change

Answer :56 blank spaces before get-job

What will be the output of the following Python code?


Options are :

  • ['3.1', '3.14', '3.142', '3.1416', '3.14159', '3.141582']
  • ['3', '3', '3', '3', '3'] (Correct)
  • ['3', '3', '3', '3', '3', '3']
  • ['3.1', '3.14', '3.142', '3.1416', '3.14159']

Answer :['3', '3', '3', '3', '3']

Python Certification Exam Preparation Set 52

What will be the output of the following Python code?


Options are :

  • Error
  • 1 4 7 2 5 8 3 6 9 (Correct)
  • [(1, 4, 7), (2, 5, 8), (3, 6, 9)]
  • (1 4 7) (2 5 8) (3 6 9)

Answer : 1 4 7 2 5 8 3 6 9

What will be the output of the following Python code?


Options are :

  • none of the mentioned
  • [None, None]
  • ['AB', 'CD']
  • ['ab', 'cd'] (Correct)

Answer :['ab', 'cd']

Which of the following statements is used to create an empty set?


Options are :

  • [ ]
  • ( )
  • set() (Correct)
  • { }

Answer :set()

Python Certification Exam Preparation Set 2

What will be the output of the following Python code?


Options are :

  • 45
  • "john"
  • "peter"
  • 40 (Correct)

Answer :40

What will be the output of the following Python code?


Options are :

  • (1, 2)
  • (2, 4, 3)
  • (2, 4) (Correct)
  • (1, 2, 4)

Answer :(2, 4)

What will be the output of the following Python code?


Options are :

  • f
  • Error
  • t (Correct)
  • No output

Answer :t

Python Certification Exam Preparation Set 63

What will be the output of the following Python code?


Options are :

  • [1, 0, 2, 0, 'hello', ", []]
  • Error
  • [1, 0, 2, 'hello', ", []]
  • [1, 2, 'hello'] (Correct)

Answer :[1, 2, 'hello']

Which of the following is not the correct syntax for creating a set?


Options are :

  • set((1,2,3,4))
  • set([1,2,2,3,4])
  • set([[1,2],[3,4]]) (Correct)
  • {1,2,3,4}

Answer :set([[1,2],[3,4]])

Which of the following is a Python tuple?


Options are :

  • {1, 2, 3}
  • (1, 2, 3) (Correct)
  • [1, 2, 3]
  • {}

Answer :(1, 2, 3)

Python Certification Exam Preparation Set 6

What will be the output of the following Python code?


Options are :

  • Error
  • (1 4 7) (2 5 8) (3 6 9)
  • [[1, 4, 7], [2, 5, 8], [3, 6, 9]] (Correct)
  • 1 4 7 2 5 8 3 6 9

Answer :[[1, 4, 7], [2, 5, 8], [3, 6, 9]]

What will be the output of the following Python code?


Options are :

  • 33 (Correct)
  • 24
  • 30
  • 12

Answer :33

What will be the output of the following Python code?


Options are :

  • pass
  • true (Correct)
  • false
  • error

Answer :true

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

What will be the output of the following Python code?


Options are :

  • [1, 1, 2, 2]
  • (1, 2, 1, 2) (Correct)
  • (1, 1, 2, 2)
  • [1, 2, 1, 2]

Answer :(1, 2, 1, 2)

What will be the output of the following Python code?


Options are :

  • False
  • True (Correct)
  • {1,2}
  • Invalid operation

Answer :True

What will be the output of the following Python code?


Options are :

  • Error, invalid syntax for formation of set
  • 8
  • 7
  • 4 (Correct)

Answer :4

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

What will be the output of the following Python code?


Options are :

  • bad
  • error
  • hello
  • good (Correct)

Answer :good

What will be the output of the following Python code snippet?


Options are :

  • hi000
  • 00000hi
  • error (Correct)
  • 000hi

Answer :error

What will be the output of the following Python code?


Options are :

  • 5 5 6 7 7 7 (Correct)
  • 5 6 7
  • 5 5 6
  • 5 6 7 7 7

Answer :5 5 6 7 7 7

Python Certification Exam Preparation Set 5

Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions