Associate Programmer Analyst
Associate Programmer Analyst Interview Questions and Answers

Asked in TCS

Q. What are the differences between lists and tuples?
Lists are mutable and ordered, while tuples are immutable and ordered collections in Python.
Mutability: Lists can be modified (e.g., list.append(1)), while tuples cannot (e.g., tuple[0] = 1 raises an error).
Syntax: Lists use square brackets [] (e.g., myList = [1, 2, 3]), while tuples use parentheses () (e.g., myTuple = (1, 2, 3)).
Performance: Tuples are generally faster than lists for iteration due to their immutability.
Use Cases: Lists are used for collections of items that ...read more

Asked in EbixCash Limited

Q. Write a program to add two variables.
Adding two variables involves summing their values to produce a new result, often used in programming and calculations.
Variables can hold different data types, such as integers or floats. Example: int a = 5; int b = 10; int sum = a + b;
In programming, addition can be performed using the '+' operator. Example: float x = 2.5; float y = 3.5; float total = x + y;
When adding arrays, you may need to iterate through elements. Example: for (int i = 0; i < array.length; i++) { sum += ...read more
Interview Questions of Similar Designations
Interview Experiences of Popular Companies






Reviews
Interviews
Salaries
Users

