Python Programming - MCQ Practice Questions
Core Python MCQs — syntax, data types, OOP, libraries for placements & IT exams.
119 questions | 100% Free
What is the output of: print(10 // 3)?
Which of the following is an immutable data type in Python?
What will be the output of: len('hello world')?
Which of the following will correctly concatenate two strings 'Hello' and 'World'?
What will be the output of: x = 5; y = x; y = 10; print(x)?
What will be the output of: print(type({}))?
What will be the output of: print(abs(-5) + abs(3))?
Which of the following is a valid variable name in Python?
What will be the output of: print(max([3, 1, 4, 1, 5, 9, 2, 6]))?
What will be the output of: x = [1, 2, 3]; x.append(4); print(len(x))?
What will be the output of: print('a' * 3 + 'b' * 2)?
What will be the output of: x = '10'; y = int(x); print(y + 5)?
Which of the following code snippets will execute without raising a NameError?
What will be the output of: print(all([True, True, True]))?
Consider the following code: x = [1, 2, 3] y = x[::-1] print(y) What will be the output?
What will be the output of: print({1, 2, 3} | {3, 4, 5})?
What is the correct way to create a dictionary in Python?
Which of the following statements about Python tuples is correct?
What will be the output of: x = 5; y = 10; print(x == y)
What does len() function return when applied to a string?