Python
What command is used to generate an SSH key? ssh-keygen
Which of the following is NOT a benefit of using Git? File compression
What is the purpose of git commit -m "message"? To save changes with a commit message.
What is the command to initialize a new Git repository? git init
What is the purpose of SSH keys in GitHub? Secure authentication without entering passwords.
What does git pull do? Fetches and merges changes from a remote repository.
What is Git? A distributed version control system.
Which of the following is NOT a basic Linux command? git init
What is the kernel in an operating system? The core that interacts with hardware.
Who is the creator of both Linux and Git? Linus Torvalds.
What does pytest do? Runs automated tests in Python.
How do you activate a virtual environment in Linux or Mac? source venv/bin/activate
What is the role of pip install -r requirements.txt? Installs all dependencies listed in requirements.txt.
What command is used to create a virtual environment in Python? python -m venv venv
What is the purpose of a Python virtual environment (venv)? To manage dependencies and isolate projects.
How do you check the status of a Git repository? git status
How do you deactivate a virtual environment in Python? deactivate
What does git clone do? Copies an existing repository to your local machine.
What command is used to check the Python version installed on a system? python --version
How do you define a private variable in Python? Using double underscore (__var).
What is abstraction in OOP? Hiding complex implementation details and exposing only the necessary parts.
What does @staticmethod do in Python? Defines a method that doesn't modify the class or instance.
What is the difference between isinstance() and issubclass()? isinstance() checks an object's type, while issubclass() checks if a class is derived from another.
What does super() do in Python? Calls the constructor or methods of the parent class.
What is Object-Oriented Programming (OOP)? A programming paradigm based on objects and classes.
What is inheritance in OOP? The ability of a class to acquire properties and methods from another class.
What is the purpose of unit testing in Python? To ensure individual components of a program work as expected.
What is duck typing in Python? A dynamic typing feature where an object's behavior determines its type.
What is the difference between deepcopy() and copy()? deepcopy() creates independent copies, while copy() creates shallow copies.
How do you make a Python class iterable? Implement iter() and next() methods.
What does @property do in Python? Makes a method behave like an attribute.
What is the primary purpose of the Decorator pattern? To modify the behavior of an object at runtime.
How do you prevent method overriding in a subclass? By using the final keyword.
What does call() do in Python? Makes an object callable like a function.
What is multiple inheritance in Python? When a class inherits from more than one class.
How do you check if an object is an instance of a specific class? isinstance(object, class)
What is monkey patching in Python? Modifying a module or class at runtime.
What is the role of super() in Python? To call the constructor of the parent class.
Which library is commonly used to load environment variables from a .env file in Python? dotenv
What is an ORM in Python? Object Relational Mapping.
What is an .ini file used for? Configuration settings.
What is the Command design pattern? Encapsulates a request as an object.
What is the purpose of a .env file in a Python application? Store environment variables for configuration.
What is the Singleton design pattern? Ensures only one instance of a class exists.
What is serialization in Python? Converting objects into a format that can be stored or transmitted.
What is the Factory Design Pattern used for? Creating new instances of objects dynamically.
What does pandas.DataFrame represent? A two-dimensional, tabular data structure.