Interview Questions
Interview Questions
PYTHON
1. What is Python? What are the benefits of using Python
Python is a high-level, interpreted, general-purpose programming language.
Being a general-purpose language, it can be used to build almost any type of
application with the right tools/libraries. Is a very popular language for
machine learning as well.
A local scope refers to the local objects available in the current function.
Interview Questions 1
A global scope refers to the objects available throughout the code
execution since their inception.
example :
Interview Questions 2
- Lists in python can contain elements of different data types
6. What are lists and tuples? What is the key difference between the two?
Lists and Tuples are both sequence data types that can store a collection of
objects in Python.
Interview Questions 3
The pass keyword represents a null operation in Python. We use pass to write
empty functions.
Modules, in general, are simply Python files with a .py extension and can have
a set of functions, classes, or variables defined and implemented.
class Student:
def __init__(self, name):
self.studentName = name
stu1 = Student("Manish")
__init__ is a constructor.
Interview Questions 4
class Student:
def __init__(self, name):
self.studentName = name
The continue statement skips the current code in the loop and go to
Continue
the next iteration.
Pass The pass keyword in Python is generally used to fill up empty blocks.
Multiple line comments are called doctsring. Used to explain the code.
Interview Questions 5
14. What is lambda in Python? Why is it used?
Interview Questions 6
**kwargs = keyword arguments ( ** is the keyword arguments )
OOPS
1. Why do we need to use OOPs?
Object oriented programming helps use to write clear and concise code for
problem solving. Like we can write a function and reuse it with the help of
inheritance. Dividing problems into sub problems. etc.
Interview Questions 7
2. What are the four pillars of OOP?
Interview Questions 8
DSA ( WATCH YOUTUBE VIDEOS )
1. How queue works. Real life application. Operation performed in stack.
3. How linked list works. Different type of linked list. ( I was asked: what is the
difference between singly LL and doubly LL ).
SQL
1. What is Database?
2. What is DBMS?
3. What is RDBMS?
RDBMS = Relational database management system, It is similar as DBMS but
stores data in the form of tables. These tables have relations defined by
common fields.
Interview Questions 9
4. What is SQL?
5. What NoSQL?
6. What is MySQL?
MySQL is nothing but RDBMS like SQL server that are used to manage SQL
databse.
Interview Questions 10
Constraints are used to specify the rules concerning data in the table.
•
PRIMARY KEY - Uniquely identifies each record in a table.
•
FOREIGN KEY - Ensures referential integrity for a record in another table.
•
UNIQUE - Ensures unique values to be inserted into the field.
•
NOT NULL - Restricts NULL value from being inserted into a column.
The PRIMARY KEY constraint uniquely identifies each row in a table. It must
contain UNIQUE values and has an implicit NOT NULL constraint.
Interview Questions 11