iGET

Python Programming - MCQ Practice Questions

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

119 questions | 100% Free

Q.41Easy

What will be the output of: print(type(3.14))

Q.42Medium

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

Q.43Medium

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

Q.44Medium

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

Q.45Medium

What will be the output of: print(bool(0), bool(''), bool([]))

Q.46Medium

Which operator in Python performs integer division?

Q.47Medium

What is the output of: for i in range(3): print(i, end=' ')

Q.48Medium

Consider: s = 'Python'; print(s[2:5]). What will be the output?

Q.49Medium

What will be the output of: x = 10; y = 20; x, y = y, x; print(x, y)

Q.50Hard

Which of the following will raise a TypeError in Python?

Q.51Hard

What will be the output of: d = {'a': 1, 'b': 2}; print(list(d.items()))

Q.52Hard

Consider: x = [i**2 for i in range(4)]. What is x?

Q.53Hard

What will be the output of: print(any([False, False, True]))

Q.54Easy

In Python, which of the following is an immutable data type?

Q.55Easy

What will be the result of executing: print(type(5.0))?

Q.56Easy

What does the len() function return when applied to a string 'India'?

Q.57Easy

Consider the code: num = '123'. What will int(num) return?

Q.58Easy

Which of the following is the correct syntax for a Python comment?

Q.59Easy

What is the output of: print('Hello' + ' ' + 'World')?

Q.60Easy

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