Python Programming - MCQ Practice Questions
Core Python MCQs — syntax, data types, OOP, libraries for placements & IT exams.
119 questions | 100% Free
What does the len() function return when applied to a string 'India'?
Consider the code: num = '123'. What will int(num) return?
Which of the following is the correct syntax for a Python comment?
What is the output of: print('Hello' + ' ' + 'World')?
Which method is used to add an element to a list in Python?
What will be the output of: print(10 // 3)?
Which of the following is NOT a valid Python variable name?
What is the output of: print(10 // 3 + 10 % 3)?
What will be the data type of x after executing: x = ?
What is the output of: print(len('Python'))?
What will be the output of: print(10 if 5 > 3 else 20)?
What is the output of: print('a' in 'banana')?
What will be the output of: x = 5; x += 3; print(x)?