InterviewPitch

Land the job you want — prepare
with Real interviews Q&A

Curated interview questions, company-wise guides and coding rounds. Practice mock interviews, improve with feedback, and track your progress.

Q&A
Top curated interview packs
Company-wise & role-wise packs, quality assured.
Mock interview
AI scoring
Coding rounds
Top 10 sets
Beginner

1. What is Python? What are the benefits of using Python?

Python is a high-level, interpreted, and general-purpose programming language designed to be simple, readable, and easy to learn. It was created by Guido van Rossum and released in 1991.

Python emphasizes code readability and allows developers to write programs with fewer lines of code compared to languages like C++ or Java. It supports multiple programming paradigms:

  • Object-Oriented Programming (OOP)
  • Procedural Programming
  • Functional Programming

Python is widely used in web development, data science, artificial intelligence, automation, and software development.

Benefits of Using Python

  1. Easy to Learn and Use : Simple and readable syntax makes it beginner-friendly.
  2. Interpreted Language : Executed line-by-line, making debugging easier.
  3. Platform Independent : Runs on Windows, Linux, and macOS without changes.
  4. Used in Modern Technologies
    • Artificial Intelligence & Machine Learning
    • Data Science & Analytics
    • Web Development
    • Automation & Scripting
Beginner
2. Is Python a compiled language or an interpreted language?

Python is both compiled and interpreted, but it is commonly referred to as an interpreted language.

Compilation Step

When you run a Python program, the source code (.py file) is first compiled into bytecode (.pyc files). This step happens automatically and is not visible to the user.

Interpretation Step

The generated bytecode is then executed by the Python Virtual Machine (PVM) line by line.

How Python Works Internally
  1. You write code → example.py
  2. Python compiles it → Bytecode (.pyc)
  3. Python Virtual Machine executes it
Beginner
3. What is a dynamically typed language?

A dynamically typed language is a programming language where the type of a variable is determined at runtime.

  • You don’t need to declare the data type.
  • The language decides it during execution.
python
x = 10        # x is an integer
x = "Hello"   # now x becomes a string
Beginner
4. This creates a new list by combining both lists.

This creates a new list by combining both lists.

const cannot be reassigned.
Beginner
5. What are data types in JavaScript?
String, Number, Boolean, Null, Undefined, Object, Symbol, BigInt.
Beginner
6. What is a function?
A reusable block of code designed to perform a task.
Beginner
7. What is an array?
An array stores multiple values in a single variable.
Beginner
8. What is an object?
An object is a collection of key-value pairs.
Beginner
9. What is DOM?
DOM (Document Object Model) represents HTML elements as objects.
Beginner
10. What is an event?
An action that occurs in the browser, like click or submit.
Beginner
11. What is null?
null represents an intentional absence of value.
Beginner
12. What is undefined?
A variable declared but not assigned a value.
Beginner
13. What is typeof operator?
It returns the data type of a variable.
Beginner
14. What is NaN?
NaN means "Not a Number", returned for invalid numeric operations.
Beginner
15. What is strict mode?
A mode that helps catch common coding mistakes using "use strict".
Intermediate
16. What is hoisting?
JavaScript moves variable and function declarations to the top of scope.
Intermediate
17. What is closure?
A function that remembers variables from its outer scope.
Intermediate
18. What is scope?
Scope determines where variables are accessible.
Intermediate
19. Difference between == and ===?
== compares values only, === compares value and type.
Intermediate
20. What is a callback function?
A function passed as an argument to another function.
Intermediate
21. What is JSON?
JavaScript Object Notation, used for data exchange.
Intermediate
22. What is promise?
An object representing eventual completion or failure of async operation.
Intermediate
23. What is async/await?
Syntax to handle promises in a cleaner way.
Intermediate
24. What is event bubbling?
Event propagates from child to parent elements.
Intermediate
25. What is event delegation?
Handling events at parent level instead of multiple child elements.
Intermediate
26. What is this keyword?
Refers to the object that is currently executing the function.
Intermediate
27. What is arrow function?
Shorter syntax for writing functions using .
Intermediate
28. What is map()?
Creates a new array by applying a function to each element.
Intermediate
29. What is filter()?
Returns elements that satisfy a condition.
Intermediate
30. What is reduce()?
Reduces array to a single value.
Advanced
31. What is prototype?
Mechanism to share properties between objects.
Advanced
32. What is prototypal inheritance?
Objects inherit properties from another object.
Advanced
33. What is currying?
Transforming a function with multiple arguments into nested functions.
Advanced
34. What is debouncing?
Limits function execution rate after user stops triggering event.
Advanced
35. What is throttling?
Ensures function executes at fixed time intervals.
Advanced
36. What is event loop?
Handles asynchronous callbacks in JavaScript.
Advanced
37. What is call(), apply(), bind()?
Methods to control this context in functions.
Advanced
38. What is memory leak?
When memory is not released after use.
Advanced
39. What is module in JavaScript?
Reusable file exporting functionality using import/export.
Advanced
40. What is IIFE?
Immediately Invoked Function Expression executes instantly.
Coding Round
41. Reverse a string
str.split('').reverse().join('')
Coding Round
42. Check palindrome
str === str.split('').reverse().join('')
Coding Round
43. Find max in array
Math.max(...arr)
Coding Round
44. Remove duplicates
[...new Set(arr)]
Coding Round
45. Merge arrays
[...arr1, ...arr2]
Coding Round
46. Convert string to number
Number(str)
Coding Round
47. Loop through object
Answer Here
Coding Round
48. Delay function execution
Answer Here
Coding Round
49. Fetch API example
Answer Here
Coding Round
50. Create a promise
Answer Here