Skip to main content

Introduction To Python — Part 2 MCQs with Explanations

Practice high-yield Programming & Software Development MCQs on Introduction To Python — Part 2 with worked academic solutions for FPSC, PPSC, NTS, NITB, PTS.

Questions
35
Difficulty Level
Exam-Level
Target Exams
FPSC, PPSC, NTS...
Estimated Time
42 mins
Exam-Level FPSC PPSC NTS NITB PTS
Verified for Commission Syllabus • Oct 14, 2026
35

Verified Practice Questions

Interactive test mode with detailed academic worked solutions

Live Progress | 0/35 answered
✓ 0 correct ✗ 0 wrong 0% score
Question 1 of 35
★ FPSC ★ PPSC

What will be the output of the following Python function? min(max(False,-3,-4), 2,7)

Question 2 of 35
★ FPSC ★ PPSC

What will be the output of the following Python function? len(["hello",2, 4, 6])

Question 3 of 35
★ FPSC ★ PPSC

Which of the following is not a core data type in Python programming?

Question 4 of 35
★ FPSC ★ PPSC

Which one of the following is not a keyword in Python language?

Question 5 of 35
★ FPSC ★ PPSC

What will be the output of the following Python code? x = [[0], [1]] print((' '.join(list(map(str, x))),))

Question 6 of 35
★ FPSC ★ PPSC

What will be the output of the following Python code? def foo(): try: return 1 finally: return 2 k = foo() print(k)

Question 7 of 35
★ FPSC ★ PPSC

To add a new element to a list we use which Python command?

Question 8 of 35
★ FPSC ★ PPSC

The following python program can work with . . . . . . . . parameters. def f(x): def f1(*args, **kwargs): print("Examveda") return x(*args, **kwargs) return f1

Question 9 of 35
★ FPSC ★ PPSC

What is the maximum possible length of an identifier in Python?

Question 10 of 35
★ FPSC ★ PPSC

What will be the output of the following Python code? i = 1 while True: if i%3 == 0: break print(i) i + = 1

Question 11 of 35
★ FPSC ★ PPSC

Which of the following is a Python tuple?

Question 12 of 35
★ FPSC ★ PPSC

What will be the output of the following Python code? print('*', "abcde".center(6), '*', sep='')

Question 13 of 35
★ FPSC ★ PPSC

What will be the output of the following Python program? def foo(x): x[0] = ['def'] x[1] = ['abc'] return id(x) q = ['abc', 'def'] print(id(q) == foo(q))

Question 14 of 35
★ FPSC ★ PPSC

What will be the output of the following Python code snippet? for i in [1, 2, 3, 4][::-1]: print (i)

Question 15 of 35
★ FPSC ★ PPSC

What arithmetic operators cannot be used with strings in Python?

Question 16 of 35
★ FPSC ★ PPSC

Which of the following is the truncation division operator in Python?

Question 17 of 35
★ FPSC ★ PPSC

The process of pickling in Python includes . . . . . . . .

Question 18 of 35
★ FPSC ★ PPSC

What will be the value of 'result' in following Python program? list1 = [1,2,3,4] list2 = [2,4,5,6] list3 = [2,6,7,8] result = list() result.extend(i for i in list1 if i not in (list2+list3) and i not in result) result.extend(i for i in list2 if i not in (list1+list3) and i not in result) result.extend(i for i in list3 if i not in (list1+list2) and i not in result)

Question 19 of 35
★ FPSC ★ PPSC

Which function is called when the following Python program is executed? f = foo() format(f)

Question 20 of 35
★ FPSC ★ PPSC

What will be the output of the following Python program? z=set('abc') z.add('san') z.update(set(['p', 'q'])) z

Question 21 of 35
★ FPSC ★ PPSC

What will be the output of the following Python expression if x=56.236? print("%.2f"%x)

Question 22 of 35
★ FPSC ★ PPSC

What will be the output of the following Python code snippet? z=set('abc$de') 'a' in z

Question 23 of 35
★ FPSC ★ PPSC

Which module in the python standard library parses options received from the command line?

Question 24 of 35
★ FPSC ★ PPSC

What will be the output of the following Python code? >>>list1 = [1, 3] >>>list2 = list1 >>>list1[0] = 4 >>>print(list2)

Question 25 of 35
★ FPSC ★ PPSC

What will be the output of the following Python code? x = 'abcd' for i in range(len(x)): print(i)

Question 26 of 35
★ FPSC ★ PPSC

What will be the output of the following Python statement? >>>"a"+"bc"

Question 27 of 35
★ FPSC ★ PPSC

What are the two main types of functions in Python?

Question 28 of 35
★ FPSC ★ PPSC

What is output of print(math.pow(3, 2))?

Question 29 of 35
★ FPSC ★ PPSC

What will be the output of the following Python program? def addItem(listParam): listParam += [1] mylist = [1, 2, 3, 4] addItem(mylist) print(len(mylist))

Question 30 of 35
★ FPSC ★ PPSC

Which of the following statements is used to create an empty set in Python?

Question 31 of 35
★ FPSC ★ PPSC

Which of the following is a feature of Python DocString?

Question 32 of 35
★ FPSC ★ PPSC

Which of the following Python statements will result in the output: 6? A = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]

Question 33 of 35
★ FPSC ★ PPSC

What will be the output of the following Python code? print("Hello {0[0]} and {0[1]}".format(('foo', 'bin')))

Question 34 of 35
★ FPSC ★ PPSC

What will be the output of the following Python code? class tester: def __init__(self, id): self.id = str(id) id="224" >>>temp = tester(12) >>>print(temp.id)

Question 35 of 35
★ FPSC ★ PPSC

What will be the output of the following Python expression? round(4.576)

✓ Link copied to clipboard
Continue Your Practice

Advance Html — Part 1

Master the next curriculum module with 40 exam-standard MCQs.

Next Practice Set →

💡 Examiner's Advisory for Programming & Software Development

In competitive commission exams (FPSC, PPSC, KPPSC, SPSC, CSS, PMS), questions are frequently phrased with distractor options designed to catch rote learners. Whenever you answer an MCQ, read the Detailed Academic Explanation and Conceptual Anchor to understand why the remaining options are incorrect.

More Modules in Programming & Software Development

View All →
📚

Study Guides

Topic summaries and syllabus breakdown

Explore Guides →
🎯

Complete Library

Search through 78,000+ verified MCQs

Browse Library →
📱

Mobile App

Offline mock tests and instant bookmarks

Get Mobile App →