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

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


Options are :

  • ('abef')
  • ('abef', 'cd', ")
  • ('abef', ", ")
  • error

Answer :('abef', ", ")

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


Options are :

  • ab12ef12
  • abcdef12
  • ab12efcd
  • none of the mentioned

Answer :ab12ef12

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


Options are :

  • abef
  • 12
  • error
  • none of the mentioned

Answer :abef

Python Certification Exam Preparation Set 23

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


Options are :

  • ab1ef2
  • abcefd
  • ab1efd
  • ab12ed2

Answer :abcefd

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


Options are :

  • xyyxyyxyxyxxy
  • 12y12y1212x12
  • 12yxyyxyxyxxy
  • xyyxyyxyxyx12

Answer :xyyxyyxyxyxxy

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


Options are :

  • xyyxyyxyxyxxy
  • 12y12y1212x12
  • none of the mentioned
  • error

Answer :12y12y1212x12

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

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


Options are :

  • ['ab', 'ef', 'gh']
  • ['ab', 'ef', 'gh', "]
  • ('ab', 'ef', 'gh')
  • ('ab', 'ef', 'gh', ")

Answer :['ab', 'ef', 'gh', "]

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


Options are :

  • ['abcdefcdghcd']
  • 'abcdefcdghcd'
  • error
  • none of the mentioned

Answer :['abcdefcdghcd']

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


Options are :

  • ['ab', 'ef', 'gh']
  • ['ab', 'ef', 'gh', "]
  • ('ab', 'ef', 'gh')
  • ('ab', 'ef', 'gh', ")

Answer :['ab', 'ef', 'gh', "]

Python Certification Exam Preparation Set 64

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


Options are :

  • ['ab', 'ef', 'ghcd']
  • ['ab', 'efcdghcd']
  • ['abcdef', 'ghcd']
  • none of the mentioned

Answer :['ab', 'ef', 'ghcd']

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


Options are :

  • ['ab', 'cd', 'ef']
  • ['ab\n', 'cd\n', 'ef\n']
  • ['ab\n', 'cd\n', 'ef']
  • ['ab', 'cd', 'ef\n']

Answer :['ab', 'cd', 'ef']

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


Options are :

Answer :aB!2

Python Certification Exam Preparation Set 15

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


Options are :

  • Ab cd ef
  • Ab cd eF
  • Ab Cd Ef
  • none of the mentioned

Answer :Ab Cd Ef

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


Options are :

  • bcde
  • abcd
  • error
  • bcdd

Answer :bcdd

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


Options are :

  • bcde
  • abcd
  • error
  • none of the mentioned

Answer :none of the mentioned

Python Certification Exam Preparation Set 56

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


Options are :

  • abcd
  • 1234
  • error
  • none of the mentioned

Answer :abcd

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


Options are :

  • 000ab
  • 00ab0
  • 0ab00
  • ab000

Answer :000ab

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


Options are :

  • 00+99
  • 00099
  • +0099
  • +++99

Answer :+0099

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

Which of the following commands will create a list?


Options are :

  • list1 = list()
  • list1 = []
  • list1 = list([1, 2, 3])
  • all of the mentioned

Answer :all of the mentioned

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


Options are :

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

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

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


Options are :

  • 5
  • 4
  • None
  • Error

Answer :5

Python Certification Exam Preparation Set 61

Suppose list1 is [2445,133,12454,123], what is max(list1)?


Options are :

  • 2445
  • 133
  • 12454
  • 123

Answer :12454

Suppose list1 is [3, 5, 25, 1, 3], what is min(list1)?


Options are :

  • 3
  • 5
  • 25
  • 1

Answer :1

Min returns the minimum element in the list.


Options are :

  • 1
  • 9
  • 15
  • Error

Answer :15

Python Certification Exam Preparation Set 53

To shuffle the list(say list1) what function do we use?


Options are :

  • list1.shuffle()
  • shuffle(list1)
  • random.shuffle(list1)
  • random.shuffleList(list1)

Answer :random.shuffle(list1)

Suppose list1 is [4, 2, 2, 4, 5, 2, 1, 0], Which of the following is correct syntax for slicing operation?


Options are :

  • print(list1[0])
  • print(list1[:2])
  • print(list1[:-2])
  • all of the mentioned

Answer :all of the mentioned

Suppose list1 is [2, 33, 222, 14, 25], What is list1[-1]?


Options are :

  • Error
  • None
  • 25
  • 2

Answer :25

Python Certification Exam Preparation Set 6

Suppose list1 is [2, 33, 222, 14, 25], What is list1[:-1]?


Options are :

  • [2, 33, 222, 14]
  • Error
  • 25
  • [25, 14, 222, 33, 2]

Answer :[2, 33, 222, 14]

What will be the output of the following Python code?


Options are :

  • A
  • Daman
  • Error
  • n

Answer :n

What will be the output of the following Python code?


Options are :

  • 11
  • 12
  • 21
  • 22

Answer :12

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

Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions