Q2131. How do you take input in Python?
For taking input from the user, we have the function input(). In Python 2, we had another function raw_input(). The input() function takes, as an argument, the text to be...
Technical Question Bank · Peer-Reviewed
Search and filter frequently asked interview questions across technical, programming, and behavioral domains. Tailor your interview preparation by difficulty for freshers or experienced developers (2,728 available).
For taking input from the user, we have the function input(). In Python 2, we had another function raw_input(). The input() function takes, as an argument, the text to be...
You can use the `Object.getOwnPropertyDescriptors()` method which returns all own property descriptors of a given object. The example usage of this method is below, ```ja...
A **common pitfall** when using `useContext` with objects is **triggering unnecessary re-renders** across all consuming components — even when only part of the context va...
When we want to execute a sequence of statements, we can give it a name. Let's def ine a function to take two numbers and return the greater number. ```python >>> def gre...
A property descriptor is a record which has the following attributes 1. `value`: The value associated with the property 2. `writable`: Determines whether the value associ...
When a component calls `useContext(SomeContext)` but **no matching** `` **is present higher up in the component tree**, the **default value** passed to `React.createConte...
When a function makes a call to itself, it is termed recursion. But then, in order for it to avoid forming an infinite loop, we must have a base condition. Let's take an ...
The `extends` keyword is used in class declarations/expressions to create a class which is a child of another class. It can be used to subclass custom classes as well as ...
The `useEffect` hook accepts an optional dependencies argument that accepts an array of reactive values. The **dependency array** determines **when** the effect runs. i.e...
Top python interview questions with answers Relational operators compare values. Less than (>> 'hi') If the value on the left is greater, it return s True. ```python >>> ...
HireXTech uses essential storage to remember your study preferences and third-party advertising cookies via Google AdSense in compliance with GDPR. You can choose to enable essential cookies only or accept all cookies. Read our Privacy Policy.