Filter interviews by
I applied via Company Website and was interviewed in Mar 2024. There were 3 interview rounds.
Verbal Reasoning Test,evaluates the ability to comprehend written information, analyze arguments, and draw logical conclusions. It's useful for roles that require strong communication and critical thinking skills.
Procedural programming focuses on procedures and functions, while OOP focuses on objects and classes.
Procedural programming uses a top-down approach, breaking down tasks into smaller procedures/functions.
OOP focuses on creating objects that contain both data and methods to manipulate that data.
In procedural programming, data and functions are separate entities, while in OOP, they are encapsulated within objects.
Example...
Function in Python that takes a list of integers as input and returns the sum of all the even numbers in the list.
# Input
numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
# Output
# Sum of even numbers: 2 + 4 + 6 + 8 + 10 = 30
print(sum_even_numbers(numbers)) # Output: 30
Solution:
def sum_even_numbers(numbers):
"""
Calculate the sum of all even numbers in a list.
Args:
numbers (list of int): List of integers.
Returns:
int: Sum of all even numbers in the list.
"""
return sum(num for num in numbers if num % 2 == 0)
# Test the function
numbers = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
print(sum_even_numbers(numbers)) # Output: 30
Top trending discussions
Civil Site Engineer
40
salaries
| ₹4.7 L/yr - ₹12.3 L/yr |
Civil Engineer
32
salaries
| ₹4.5 L/yr - ₹12.8 L/yr |
HSE Advisor
29
salaries
| ₹6 L/yr - ₹15 L/yr |
Site Engineer
27
salaries
| ₹4.8 L/yr - ₹13.7 L/yr |
QA QC Engineer
24
salaries
| ₹6.8 L/yr - ₹16 L/yr |
Larsen & Toubro Limited
Tata Group
Reliance Industries
Adani Group