iGET

Python Programming - MCQ Practice Questions

Core Python MCQs — syntax, data types, OOP, libraries for placements & IT exams.

119 questions | 100% Free

Q.1Medium

Which data type is immutable in Python?

Q.2Medium

Which operator is used for integer division in Python 3?

Q.3Medium

Which of the following will create an empty dictionary?

Q.4Medium

Which method is used to add an element to a Python list?

Q.5Medium

What will be the output of: 'Hello' * 2?

Q.6Medium

Which of the following is a mutable data type in Python?

Q.7Medium

What will be the output of: 'a' in 'apple'?

Q.8Medium

What will be the output of: x = 5; y = x; y = 10; print(x)?

Q.9Medium

What will be the output of: print(type({}))?

Q.10Medium

What will be the output of: print(abs(-5) + abs(3))?

Q.11Medium

Which of the following is a valid variable name in Python?

Q.12Medium

What will be the output of: print(max([3, 1, 4, 1, 5, 9, 2, 6]))?

Q.13Medium

What will be the output of: x = [1, 2, 3]; x.append(4); print(len(x))?

Q.14Medium

What will be the output of: print('a' * 3 + 'b' * 2)?

Q.15Medium

What will be the output of: x = '10'; y = int(x); print(y + 5)?

Q.16Medium

Which of the following code snippets will execute without raising a NameError?

Q.17Medium

What will be the output of: print(all([True, True, True]))?

Q.18Medium

What is the output of: x = '25'; y = int(x); print(y + 5)

Q.19Medium

What will be the output of: lst = [1, 2, 3]; lst.extend([4, 5]); print(lst)

Q.20Medium

Consider the code: x = [10, 20, 30]; y = x; y[0] = 99; print(x[0]). What is the output?