iGET

Python Programming - MCQ Practice Questions

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

119 questions | 100% Free

Q.1Easy

What is the correct way to create a variable in Python?

Q.2Easy

Which of the following is NOT a valid Python identifier?

Q.3Easy

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

Q.4Easy

Which keyword is used to create a function in Python?

Q.5Medium

Which data type is immutable in Python?

Q.6Easy

What will be the output of: len('Python')?

Q.7Medium

Which operator is used for integer division in Python 3?

Q.8Medium

Which of the following will create an empty dictionary?

Q.9Medium

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

Q.10Medium

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

Q.11Medium

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

Q.12Hard

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

Q.13Hard

What is the output of: print(2 3 2)?

Q.14Hard

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

Q.15Easy

Which statement about Python comments is correct?

Q.16Medium

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

Q.17Hard

Which of the following will raise an IndexError?

Q.18Easy

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

Q.19Easy

Which of the following keywords is used to create a function in Python?

Q.20Easy

What will be the output of: print("Python"[2:5])?