Python Senior
Why do floating-point calculations seem inaccurate in Python?
Select the correct answer
Floating-point calculations seem inaccurate due to incorrect math operations.
Floating-point calculations seem inaccurate due to binary representation limitations.
Floating-point calculations seem inaccurate due to outdated Python versions.
Floating-point calculations seem inaccurate due to Python's internal bugs.
When Python program exits, why isn’t all the memory de-allocated?
Select the correct answer
Memory is de-allocated only in Python 3.
Memory is not de-allocated due to Python's memory leak.
All memory is de-allocated when a Python program exits.
Not all memory is de-allocated because of cyclic references and the garbage collector's limitations.
What is the difference between .py and .pyc files?
Select the correct answer
.py files contain the source code, while .pyc files contain the compiled bytecode.
.py files are compiled files, while .pyc files are source files.
.py files are used for documentation, while .pyc files are used for execution.
.py files are for testing, while .pyc files are for production.
How Python is interpreted?
Select the correct answer
Python is interpreted, meaning code is executed line by line.
Python is compiled, meaning code is converted to machine code.
Python is a hybrid language.
Python uses both compilation and interpretation simultaneously.
What is the process of compilation and linking in python?
Select the correct answer
Python code is compiled into bytecode, which is then interpreted.
Python code is compiled into machine code, which is then executed directly.
Python code is linked directly to the OS.
Python code is not compiled, it is interpreted line by line.
How is multithreading achieved in Python?
Select the correct answer
Multithreading in Python is not supported.
Multithreading in Python is achieved using the concurrent module.
Multithreading in Python is achieved using the multiprocessing module.
Multithreading in Python is achieved using the threading module.
What are function annotations in Python?
Select the correct answer
Function annotations in Python are used for exception handling.
Function annotations in Python are a form of comments.
Function annotations in Python are used to create abstract methods.
Function annotations in Python are a way of associating metadata with function arguments and return values.
What is monkey patching in Python?
Select the correct answer
Monkey patching is a way to document code.
Monkey patching is a method of testing code.
Monkey patching is dynamically modifying a class or module at runtime.
Monkey patching is creating multiple versions of a class.
What are generators in Python?
Select the correct answer
Generators in Python are used to create threads.
Generators in Python are a way to create iterators using yield statements.
Generators in Python are a way to create dictionaries using yield statements.
Generators in Python are functions that run indefinitely.
What are Eggs and Wheels in Python?
Select the correct answer
Eggs and Wheels are packaging formats used for distributing Python projects.
Eggs and Wheels are Python debugging tools.
Eggs and Wheels are Python IDEs.
Eggs and Wheels are tools for Python testing.
Describe memory management in Python.
Select the correct answer
Memory management in Python is only for built-in types.
Memory management in Python is handled by the Python memory manager and includes garbage collection.
Memory management in Python is handled by the operating system.
Memory management in Python is handled manually by the programmer.