Most important Interview Question for fresher || (PYTHON, REACT, JS, SQL, DJNAGO, NUMPY,PANDAS))

Fresher Interview Questions 1–50 (Python)

Python Interview Questions (1–50)

Q1. What is Python?
Python is a high-level, interpreted programming language known for simple syntax and readability. It supports multiple paradigms like procedural, object-oriented, and functional programming. print("Hello World")
Q2. What are Python features?
Python is easy to learn, platform-independent, dynamically typed, open-source, and has a large standard library supporting web, data science, and automation. x = 10
Q3. What is a variable?
A variable stores data in memory. Python assigns the data type automatically based on the value. name = "Kamal"
Q4. What are data types in Python?
Common data types include int, float, string, list, tuple, set, and dictionary. type(10)
Q5. What is a list?
A list is an ordered, mutable collection that can store multiple values of different types. nums = [1,2,3]
Q6. What is a tuple?
A tuple is an ordered but immutable collection, meaning values cannot be changed after creation. t = (1,2)
Q7. What is a dictionary?
A dictionary stores data as key-value pairs and allows fast data access. {"name":"Aman"}
Q8. What is a set?
A set is an unordered collection of unique elements. {1,2,3}
Q9. What is indentation?
Indentation defines code blocks in Python instead of braces. if True:\n print("Yes")
Q10. What is a function?
A function is a reusable block of code that performs a specific task. def add(a,b): return a+b

NumPy & Pandas Interview Questions (11–50)

Q11. What is NumPy?
NumPy is a Python library for numerical computing, supporting arrays, matrices, and high-performance operations. It is widely used in data analysis and scientific computing. import numpy as np
Q12. What is a NumPy array?
A NumPy array is a multidimensional, homogeneous data structure for fast computation. arr = np.array([1,2,3])
Q13. Difference between list and NumPy array?
NumPy arrays are faster, use less memory, and support vectorized operations compared to Python lists. arr = np.array([1,2,3])
Q14. What is shape?
Shape returns the dimensions of a NumPy array as a tuple. arr.shape
Q15. What is dtype?
dtype shows the data type of the array elements. arr.dtype
Q16. What is np.arange()?
np.arange() creates arrays with evenly spaced values within a range. np.arange(0,10,2)
Q17. What is np.linspace()?
np.linspace() returns evenly spaced numbers over a specified interval. np.linspace(0,1,5)
Q18. What is np.zeros()?
np.zeros() creates an array filled with zeros. np.zeros((3,3))
Q19. What is np.ones()?
np.ones() creates an array filled with ones. np.ones((2,4))
Q20. What is np.eye()?
np.eye() creates an identity matrix with ones on the diagonal. np.eye(3)
Q21. What is reshaping?
Reshaping changes the dimensions of an array without altering data. arr.reshape(3,2)
Q22. What is flattening?
Flattening converts a multidimensional array into a 1D array. arr.flatten()
Q23. What is slicing?
Slicing selects a portion of an array using indices. arr[0:3]
Q24. What is indexing?
Indexing accesses elements of an array using position or boolean masks. arr[1,2]
Q25. What is broadcasting?
Broadcasting allows arithmetic operations between arrays of different shapes. arr + 5
Q26. What is np.sum()?
np.sum() computes the sum of array elements along an axis. np.sum(arr, axis=0)
Q27. What is np.mean()?
np.mean() calculates the average of array elements. np.mean(arr)
Q28. What is np.median()?
np.median() returns the median value of the array elements. np.median(arr)
Q29. What is np.std()?
np.std() computes the standard deviation of array elements. np.std(arr)
Q30. What is np.min() and np.max()?
np.min() and np.max() return the smallest and largest values of the array. np.min(arr), np.max(arr)
Q31. What is Pandas?
Pandas is a Python library for data manipulation and analysis. It provides Series and DataFrame data structures. import pandas as pd
Q32. What is a Series?
Series is a 1D labeled array capable of storing any data type. pd.Series([1,2,3])
Q33. What is a DataFrame?
DataFrame is a 2D labeled data structure with rows and columns. pd.DataFrame({'A':[1,2],'B':[3,4]})
Q34. How to read CSV?
Use read_csv() to load CSV files into a DataFrame. pd.read_csv("file.csv")
Q35. How to view top rows?
Use head() to view the first N rows of a DataFrame. df.head(5)
Q36. How to view bottom rows?
Use tail() to view the last N rows of a DataFrame. df.tail(5)
Q37. How to get column names?
Use columns attribute to get all column names. df.columns
Q38. How to select a column?
Access a column as Series using column name. df['A']
Q39. How to select multiple columns?
Pass a list of column names to get multiple columns. df[['A','B']]
Q40. How to select rows?
Use loc (label) or iloc (position) to select rows. df.loc[0], df.iloc[0]
Q41. How to filter data?
Apply conditions to DataFrame for filtering rows. df[df['A']>2]
Q42. How to add a column?
Assign a new column using DataFrame notation. df['C']=df['A']+df['B']
Q43. How to drop a column?
Use drop() to remove a column from DataFrame. df.drop('C', axis=1)
Q44. How to drop a row?
Use drop() with row index to remove a row. df.drop(0, axis=0)
Q45. How to describe data?
Use describe() to get statistical summary of numerical columns. df.describe()
Q46. How to check null values?
Use isnull() to identify missing values in DataFrame. df.isnull().sum()
Q47. How to fill null values?
Use fillna() to replace null values with a specific value. df.fillna(0)
Q48. How to drop null values?
Use dropna() to remove rows with missing values. df.dropna()
Q49. How to sort data?
Use sort_values() to sort DataFrame by a column. df.sort_values('A')
Q50. How to group data?
Use groupby() to aggregate data by column values. df.groupby('A').sum()

JavaScript & React Interview Questions ( 51–100 )

Q51. What is JavaScript?
JavaScript is a client-side scripting language used to create interactive and dynamic web pages. It runs in the browser and can manipulate HTML and CSS. alert("Hello");
Q52. What are JavaScript data types?
JavaScript data types include string, number, boolean, null, undefined, object, and symbol. let x = "text";
Q53. Difference between var, let, and const?
var is function-scoped, while let and const are block-scoped. const values cannot be reassigned. let a=5; const b=10;
Q54. What is an array?
An array stores multiple values in a single variable and is indexed. let arr=[1,2,3];
Q55. What is a function in JavaScript?
A function is a reusable block of code that performs a specific task. function add(a,b){return a+b;}
Q56. What is a loop?
Loops execute a block of code repeatedly. JavaScript supports for, while, and do-while loops. for(let i=0;i<3;i++)
Q57. What is DOM?
DOM represents the HTML structure as objects, allowing JavaScript to manipulate page content. document.getElementById("id")
Q58. What is an event?
An event is an action like click or keypress that JavaScript can respond to. onclick="fun()"
Q59. What is hoisting?
Hoisting moves variable and function declarations to the top during execution. console.log(x); var x=5;
Q60. What is closure?
A closure allows a function to access variables from its outer scope even after execution. function outer(){return function(){}}
Q61. What is JSON?
JSON is a lightweight data format used to store and exchange data. {"name":"Aman"}
Q62. What is == vs ===?
== compares values only, === compares value and data type. 5==="5"
Q63. What is arrow function?
Arrow functions provide shorter syntax and lexical this binding. const add=(a,b)=>a+b;
Q64. What is async JavaScript?
Async JavaScript allows non-blocking operations using callbacks, promises, and async/await. async function load(){}
Q65. What is a promise?
A promise represents a value that may be available now, later, or never. fetch(url).then()
Q66. What is NaN?
NaN means Not a Number and indicates invalid numeric operations. isNaN("abc")
Q67. What is localStorage?
localStorage stores data in the browser with no expiration time. localStorage.setItem()
Q68. What is sessionStorage?
sessionStorage stores data for one session and clears when the tab closes. sessionStorage.setItem()
Q69. What is scope?
Scope defines variable accessibility. JavaScript has global and local scope. let x=10;
Q70. What is strict mode?
Strict mode enforces safer coding practices and avoids silent errors. "use strict";
Q71. What is typeof?
typeof checks the data type of a variable. typeof 10
Q72. What is callback?
A callback is a function passed as an argument to another function. setTimeout(fun,1000)
Q73. What is setTimeout?
setTimeout executes a function after a specified delay. setTimeout(()=>{},1000)
Q74. What is setInterval?
setInterval repeatedly executes a function at a fixed interval. setInterval(()=>{},1000)
Q75. What is event bubbling?
Event bubbling propagates events from child to parent elements. addEventListener()
Q76. What is React?
React is a JavaScript library used for building fast and reusable user interfaces using components. function App(){}
Q77. What is JSX?
JSX allows writing HTML inside JavaScript for better UI structure. <h1>Hello</h1>
Q78. What is a component?
Components are reusable pieces of UI in React. function Header(){}
Q79. What are props?
Props pass data from parent to child components. <Comp name="Aman" />
Q80. What is state?
State stores dynamic data inside a component. useState(0)
Q81. What is useState hook?
useState allows functional components to manage state. const [x,setX]=useState()
Q82. What is useEffect?
useEffect handles side effects like API calls. useEffect(()=>{},[])
Q83. What is virtual DOM?
Virtual DOM is a lightweight copy of real DOM that improves performance. ReactDOM
Q84. What is conditional rendering?
Rendering UI based on conditions. {isLogin && <Home/>}
Q85. What is key in React?
Keys help React identify list items efficiently. key={id}
Q86. What is controlled component?
Form elements controlled by React state. value={state}
Q87. What is uncontrolled component?
Form elements managed by DOM instead of React state. useRef()
Q88. What is React Router?
React Router enables navigation between pages. <Route path="/" />
Q89. What is SPA?
Single Page Application updates UI without page reload. React App
Q90. What is lifting state up?
Sharing state between components by moving it to parent. props drilling
Q91. What is fragment?
Fragments group elements without extra DOM nodes. <>...</>
Q92. What is memo?
memo prevents unnecessary re-rendering. React.memo()
Q93. What is prop drilling?
Passing props through multiple components. parent → child
Q94. What is context API?
Context API manages global state. createContext()
Q95. What is Redux?
Redux is a state management library. store.dispatch()
Q96. What is API call?
Fetching data from backend services. fetch(url)
Q97. What is axios?
Axios is a promise-based HTTP client. axios.get()
Q98. What is default props?
Default values for props if none passed. Component.defaultProps
Q99. What is lazy loading?
Loading components only when required. React.lazy()
Q100. What is deployment?
Deployment means hosting the React app online. npm run build

React & SQL Interview Questions ( 101–150 )

Q101. What is component lifecycle?
Component lifecycle defines different stages of a React component like mounting, updating, and unmounting. useEffect()
Q102. What is mounting?
Mounting is the phase where a component is created and inserted into the DOM. componentDidMount
Q103. What is updating?
Updating happens when component state or props change. setState()
Q104. What is unmounting?
Unmounting is removing a component from the DOM. cleanup function
Q105. What is error boundary?
Error boundaries catch JavaScript errors in components. componentDidCatch
Q106. What is HOC?
Higher Order Component is a function that takes a component and returns a new component. withAuth(Component)
Q107. What is pure component?
Pure components prevent unnecessary re-rendering by shallow comparison. React.PureComponent
Q108. What is reconciliation?
Reconciliation compares virtual DOM changes with real DOM. diffing algorithm
Q109. What is server-side rendering?
SSR renders React components on the server for faster load. Next.js
Q110. What is hydration?
Hydration attaches event listeners to server-rendered HTML. hydrateRoot()
Q111. What is useCallback?
useCallback memoizes functions to avoid re-creation. useCallback(fn,[])
Q112. What is useMemo?
useMemo memoizes values for performance optimization. useMemo(()=>calc,[])
Q113. What is suspense?
Suspense handles loading states in lazy components. <Suspense>
Q114. What is ref?
Refs access DOM elements directly. useRef()
Q115. What is forwardRef?
forwardRef passes refs to child components. forwardRef()
Q116. What is SQL?
SQL is a language used to manage and query relational databases. SELECT * FROM table;
Q117. What is a database?
A database stores structured data for easy access and management. MySQL DB
Q118. What is a table?
A table stores data in rows and columns. CREATE TABLE users
Q119. What is primary key?
Primary key uniquely identifies each record. id INT PRIMARY KEY
Q120. What is foreign key?
Foreign key links two tables. REFERENCES users(id)
Q121. What is SELECT?
SELECT retrieves data from a table. SELECT name FROM users
Q122. What is WHERE?
WHERE filters records based on conditions. WHERE age > 18
Q123. What is INSERT?
INSERT adds new records into a table. INSERT INTO users VALUES()
Q124. What is UPDATE?
UPDATE modifies existing records. UPDATE users SET name='A'
Q125. What is DELETE?
DELETE removes records from a table. DELETE FROM users
Q126. What is ORDER BY?
ORDER BY sorts query results. ORDER BY name ASC
Q127. What is GROUP BY?
GROUP BY groups rows with same values. GROUP BY dept
Q128. What is HAVING?
HAVING filters grouped results. HAVING COUNT(*) > 1
Q129. What is JOIN?
JOIN combines rows from multiple tables. INNER JOIN
Q130. Types of JOIN?
INNER, LEFT, RIGHT, FULL joins. LEFT JOIN
Q131. What is index?
Index improves search performance. CREATE INDEX
Q132. What is constraint?
Constraints enforce rules on data. NOT NULL
Q133. What is UNIQUE?
UNIQUE ensures no duplicate values. email UNIQUE
Q134. What is NOT NULL?
NOT NULL prevents empty values. name VARCHAR NOT NULL
Q135. What is DEFAULT?
DEFAULT sets automatic value. status DEFAULT 1
Q136. What is view?
View is a virtual table. CREATE VIEW
Q137. What is subquery?
Query inside another query. SELECT * FROM (SELECT)
Q138. What is UNION?
UNION combines multiple SELECT results. UNION ALL
Q139. What is normalization?
Normalization reduces data redundancy. 3NF
Q140. What is denormalization?
Denormalization improves performance by duplication. data duplication
Q141. What is transaction?
Transaction is a sequence of SQL operations. COMMIT
Q142. What is ACID?
ACID ensures reliable transactions. Atomicity
Q143. What is rollback?
Rollback undoes changes. ROLLBACK
Q144. What is commit?
Commit saves changes permanently. COMMIT
Q145. What is trigger?
Trigger executes automatically on events. CREATE TRIGGER
Q146. What is stored procedure?
Stored procedure is precompiled SQL code. CALL procedure()
Q147. What is function in SQL?
SQL functions return a value. COUNT()
Q148. What is LIMIT?
LIMIT restricts number of rows. LIMIT 10
Q149. What is alias?
Alias gives temporary name. AS total
Q150. What is schema?
Schema organizes database objects. CREATE SCHEMA

Django, MySQL, CSS & HTML Interview Questions ( 151–200 )

Q151. What is Django?
Django is a high-level Python web framework that encourages rapid development and clean, pragmatic design. It follows the MTV (Model-Template-View) architecture. pip install django
Q152. What is a Django project?
A Django project is a collection of configurations and apps that make up a web application. django-admin startproject myproject
Q153. What is a Django app?
A Django app is a modular, self-contained component that performs a specific function within a project. python manage.py startapp blog
Q154. What is a model?
Models define the structure of database tables and provide an interface to interact with database records. class Book(models.Model): title = models.CharField(max_length=100)
Q155. What is a view?
Views handle request logic and return responses, often rendering templates or returning JSON. def home(request): return HttpResponse("Hello")
Q156. What is a template?
Templates define the HTML structure for pages and can include dynamic content using template tags. <h1>{{ title }}</h1>
Q157. What is URL dispatcher?
The URL dispatcher maps URLs to views using patterns defined in urls.py. path('home/', views.home)
Q158. What is ORM in Django?
Django ORM allows interacting with the database using Python objects instead of SQL queries. Book.objects.all()
Q159. What is migration?
Migrations are Django’s way to propagate changes in models to the database schema. python manage.py makemigrations
Q160. What is admin panel?
The admin panel is a built-in interface to manage models and data. python manage.py createsuperuser
Q161. What is middleware?
Middleware is a framework of hooks into Django’s request/response processing for modifying behavior. django.middleware.security.SecurityMiddleware
Q162. What is static file in Django?
Static files are CSS, JavaScript, or images served as-is in a project. /static/css/style.css
Q163. What is settings.py?
settings.py stores project configuration like database, apps, templates, and middleware. DATABASES = {...}
Q164. How to run server?
Use runserver to start Django development server on localhost. python manage.py runserver
Q165. What is template inheritance?
Template inheritance allows reusing a base template and overriding blocks in child templates. {% extends "base.html" %}
Q166. What is MySQL?
MySQL is an open-source relational database management system used to store and manage structured data. CREATE DATABASE mydb;
Q167. Difference between MySQL and SQL?
SQL is a language for querying databases, MySQL is a database software implementing SQL. SELECT * FROM users;
Q168. What is primary key?
Primary key uniquely identifies each row in a table. id INT PRIMARY KEY
Q169. What is foreign key?
A foreign key creates a link between tables to maintain referential integrity. FOREIGN KEY(user_id) REFERENCES users(id)
Q170. What is normalization?
Normalization organizes tables to reduce redundancy and improve integrity. 3NF
Q171. What is denormalization?
Denormalization duplicates data to improve query performance at the cost of redundancy. JOIN optimization
Q172. What is index?
Indexes speed up queries on large tables. CREATE INDEX idx_name ON users(name);
Q173. What is SQL JOIN?
JOIN combines rows from two or more tables based on related columns. INNER JOIN
Q174. Types of JOIN?
INNER, LEFT, RIGHT, FULL OUTER joins. LEFT JOIN users ON orders.user_id = users.id
Q175. What is a transaction?
A transaction is a sequence of SQL operations that executes as a single unit. COMMIT / ROLLBACK
Q176. What is COMMIT?
COMMIT saves all changes made in a transaction permanently to the database. COMMIT;
Q177. What is ROLLBACK?
ROLLBACK undoes all changes made in a transaction. ROLLBACK;
Q178. What is a view?
A view is a virtual table created by a SELECT query. CREATE VIEW myview AS SELECT * FROM users;
Q179. What is stored procedure?
Stored procedure is precompiled SQL code that can be executed with parameters. CALL myProcedure();
Q180. What is trigger?
A trigger automatically executes SQL when certain events occur, like INSERT or UPDATE. CREATE TRIGGER
Q181. What is CSS?
CSS (Cascading Style Sheets) is used to style HTML elements, including layout, colors, fonts, and responsiveness. p { color: red; }
Q182. What is inline CSS?
Inline CSS is applied directly to HTML elements using the style attribute. <p style="color:red">Text</p>
Q183. What is internal CSS?
Internal CSS is defined inside a <style> tag within the HTML head section. <style> p{color:red;} </style>
Q184. What is external CSS?
External CSS is written in separate .css files and linked via <link> tag. <link rel="stylesheet" href="style.css">
Q185. What is class selector?
Class selector targets elements with a specific class. .myclass { color: blue; }
Q186. What is id selector?
Id selector targets a unique element using its id attribute. #myid { color: green; }
Q187. What is pseudo-class?
Pseudo-classes define special states of elements, like :hover, :active, or :first-child. a:hover { color:red; }
Q188. What is pseudo-element?
Pseudo-elements allow styling part of an element, like ::before or ::after. p::first-line { font-weight:bold; }
Q189. What is box model?
The box model describes padding, border, margin, and content of an HTML element. div { padding:10px; border:1px; margin:5px; }
Q190. What is z-index?
z-index controls the stack order of elements; higher value appears in front. position:absolute; z-index:10;
Q191. What is HTML?
HTML (HyperText Markup Language) is the standard markup language for creating web pages. <!DOCTYPE html>
Q192. What is an element?
An element is a building block of HTML, defined by tags like <h1> or <p>. <p>Hello</p>
Q193. What is an attribute?
Attributes provide additional information about HTML elements, like id, class, or style. <p id="para1">
Q194. What is semantic HTML?
Semantic HTML uses tags that describe meaning, like <header>, <footer>, <article>. <header>My Header</header>
Q195. What is a hyperlink?
A hyperlink connects one page to another using the <a> tag. <a href="url">Click Here</a>
Q196. What is an image tag?
The <img> tag is used to display images on a web page. <img src="image.jpg" alt="desc">
Q197. What is a list?
HTML supports ordered (<ol>) and unordered (<ul>) lists with <li> items. <ul><li>Item1</li></ul>
Q198. What is a table?
Tables display data in rows and columns using <table>, <tr>, <td>. <table><tr><td>Data</td></tr></table>
Q199. What is form?
Forms collect user input using <form> tag and input elements. <form><input type="text"></form>
Q200. What is DOCTYPE?
DOCTYPE declares HTML version to the browser. <!DOCTYPE html>

Post a Comment

If you have any doubts, please tell me know

Previous Post Next Post