NeoSOFT
10+ Rehlko Interview Questions and Answers
Q1. What are examples of method overloading and method overriding in Object-Oriented Programming (OOP)?
Method overloading allows multiple methods with the same name but different parameters; overriding replaces a method in a subclass.
Method Overloading: Same method name with different parameters in the same class.
Example: def add(self, a: int, b: int) and def add(self, a: float, b: float).
Method Overriding: Subclass provides a specific implementation of a method already defined in its superclass.
Example: class Animal has a method speak(), class Dog overrides it with its own sp...read more
Q2. What are the key concepts and features of multithreading?
Multithreading allows concurrent execution of tasks in Python, enhancing performance and responsiveness in applications.
Concurrency: Multiple threads run simultaneously, improving application responsiveness.
Thread Creation: Use the 'threading' module to create threads. Example: 'threading.Thread(target=func).start()'.
Synchronization: Use locks (e.g., 'threading.Lock') to prevent race conditions when accessing shared resources.
Thread Lifecycle: Threads can be in states like 'n...read more
Q3. Types of pandas and what the role of backend developer
Q4. What is Method Resolution Order?
Method Resolution Order (MRO) is the order in which classes are searched for a method or attribute in Python.
MRO is determined by the C3 linearization algorithm in Python.
It follows a depth-first left-to-right traversal of the class hierarchy.
MRO is important in multiple inheritance scenarios to resolve method conflicts.
Example: class A: pass class B(A): pass class C(A): pass class D(B, C): pass
Q5. Difference between class method and static method.
Class method is bound to the class itself, while static method is not bound to any specific instance or class.
Class method takes 'cls' as the first parameter, allowing access to class variables and methods.
Static method does not take any special parameters and does not have access to class or instance variables.
Class method can be called on both the class and instances of the class.
Static method is mainly used for utility functions that do not require access to class or insta...read more
Q6. What are transactions in SQL?
Transactions in SQL are a way to ensure data integrity by grouping multiple SQL statements into a single unit of work.
Transactions help maintain the ACID properties (Atomicity, Consistency, Isolation, Durability) of a database.
They allow multiple SQL statements to be executed as a single unit, either all succeeding or all failing.
Transactions can be started with BEGIN TRANSACTION, COMMIT to save changes, or ROLLBACK to undo changes.
Example: transferring money from one account...read more
Q7. Types of renderer classes in DRF
DRF provides JSON, BrowsableAPI, TemplateHTML, and AdminRenderer classes for rendering responses.
JSONRenderer: Renders data in JSON format.
BrowsableAPIRenderer: Renders data in a browsable HTML format with forms for interacting with the API.
TemplateHTMLRenderer: Renders data using a specified template in HTML format.
AdminRenderer: Renders data in a format suitable for Django admin interface.
Q8. decorators and its type in python
Decorators in Python are functions that modify the behavior of other functions or methods.
Decorators are used to add functionality to existing functions without modifying their code.
Types of decorators in Python include function decorators, class decorators, and method decorators.
Example: @staticmethod and @classmethod are built-in decorators in Python.
Q9. Difference between List and Array
List is a built-in Python data structure that can hold elements of different data types, while Array is a data structure from the NumPy library that can hold elements of the same data type.
List is a dynamic array that can grow or shrink in size, while Array has a fixed size.
List can hold elements of different data types, while Array can only hold elements of the same data type.
List is a part of Python's standard library, while Array is part of the NumPy library.
List is more f...read more
Q10. What is PEP 8?
PEP 8 is the style guide for Python code, promoting readability and consistency in Python programming.
Encourages using 4 spaces per indentation level instead of tabs.
Recommends limiting lines to 79 characters for better readability.
Suggests using blank lines to separate functions and classes.
Promotes using descriptive variable names, e.g., 'user_age' instead of 'ua'.
Advises on proper import ordering: standard libraries first, then third-party libraries, and finally local appl...read more
Q11. What is pandas
Pandas is a powerful Python library for data manipulation and analysis, providing data structures like DataFrames and Series.
DataFrame: A 2-dimensional labeled data structure, similar to a spreadsheet. Example: df = pd.DataFrame({'A': [1, 2], 'B': [3, 4]})
Series: A one-dimensional labeled array capable of holding any data type. Example: s = pd.Series([1, 2, 3])
Data manipulation: Easily filter, group, and aggregate data. Example: df.groupby('A').sum()
Data cleaning: Handle miss...read more
Interview Process at Rehlko
Reviews
Interviews
Salaries
Users/Month