☑ MCQ PRACTICE

Python Programming Unit 3

Practice objective questions for quick revision and examination preparation. Try answering each question before revealing the answer.

📚 Python Programming
📖 Unit 3
🎯 MCQs
Python Programming MCQs - Unit 3

Python Programming MCQs - Unit 3

1

Which Python library runs a function as thread?

A None
B _threading
C threading
D thread
Correct Answer thread
2

How does run() method is invoked?

A By Thread.run()
B By Thread.start()
C By Thread.create()
D None
Correct Answer By Thread.start()
3

How to terminate a blocking thread?

A thread.stop() & thread.wait()
B thread.stop()
C thread.terminate()
D None
Correct Answer thread.stop() & thread.wait()
4

Which method is used to identify a thread?

A getThread()
B None
C getName()
D get_ident()
Correct Answer getName()
5

What are the libraries in Python that support threads?

A _threading
B th
C None
D thread
Correct Answer thread
6

How does global value mutation used for thread-safety?

A via GIL (Global Interpreter Lock)
B via Locking
C via Mutex
D None
Correct Answer via GIL (Global Interpreter Lock)
7

What is the method to retrieve the list of all active threads?

A getList()
B getThreads()
C enumerate()
D threads()
Correct Answer enumerate()
8

Which thread method is used to wait until it terminates?

A waitforthread()
B join()
C None
D wait()
Correct Answer join()
9

Multithreading is also called as ____________

A Concurrency
B Simultaneity
C Crosscurrent
D Recurrent
Correct Answer Concurrency
10

A single sequential flow of control within a program is ________

A Process
B Task
C Thread
D Structure
Correct Answer Thread
11

A method used to force one thread to wait for another thread to finish.

A join()
B connect()
C combine()
D concat()
Correct Answer join()
← Back to All MCQs