Python Programming - MCQ Practice Questions
Core Python MCQs — syntax, data types, OOP, libraries for placements & IT exams.
119 questions | 100% Free
Which data type is immutable in Python?
Which operator is used for integer division in Python 3?
Which of the following will create an empty dictionary?
Which method is used to add an element to a Python list?
What will be the output of: 'Hello' * 2?
Which of the following is a mutable data type in Python?
What will be the output of: 'a' in 'apple'?
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]))?
What is the output of: x = '25'; y = int(x); print(y + 5)
What will be the output of: lst = [1, 2, 3]; lst.extend([4, 5]); print(lst)
Consider the code: x = [10, 20, 30]; y = x; y[0] = 99; print(x[0]). What is the output?