iGET

Python Programming - MCQ Practice Questions

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

119 questions | 100% Free

Q.21Easy

What is the output of: print(10 // 3)?

Q.22Easy

Which of the following is an immutable data type in Python?

Q.23Easy

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

Q.24Easy

Which of the following will correctly concatenate two strings 'Hello' and 'World'?

Q.25Medium

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

Q.26Medium

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

Q.27Medium

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

Q.28Medium

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

Q.29Medium

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

Q.30Medium

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

Q.31Medium

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

Q.32Medium

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

Q.33Medium

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

Q.34Medium

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

Q.35Hard

Consider the following code: x = [1, 2, 3] y = x[::-1] print(y) What will be the output?

Q.36Hard

What will be the output of: print({1, 2, 3} | {3, 4, 5})?

Q.37Easy

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

Q.38Easy

Which of the following statements about Python tuples is correct?

Q.39Easy

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

Q.40Easy

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