An Array in JavaScript is a single variable where it can store different elements. These elements are stored at contiguous memory locations. Array elements can be accessed with the help of index numbers. The index numbers will start from 0. Syntax Below is the basic declaration of the array in JavaScript − Cosnt cars = [Maruti, Hyundai, Honda]; We need to return an array of all the indices of minimum elements in a JavaScript array Let’s look into the input-output scenario Assume there is an integer array where the minimum element is repeated more than once. We need to ... Read More
In this article, we will show you how to find the index of an object in a given input list using python. Below are the 3 different methods to accomplish this task − Using index() method Using For Loop Using List comprehension and enumerate() Function Assume we have taken a list containing some elements. We will return the index of a specified object in a given input list. Method 1: Using index() method The index() function in Python allows you to find the index position of an element or item within a string of characters or a list ... Read More
In this article, we will show you how to declare an attribute in python without a value. In Python, as well as in several other languages, there is a value that means "no value". In Python, that value with no value is None, let us see how it is used. You simply cannot. Variables are just names in Python. A name always refers to an object ("is bound"). It is conventional to set names that do not yet have a meaningful value but should be present to None. Method 1: By Initializing them with None Directly We can directly assign ... Read More
The energy of flowing wind is a versatile source of renewable and sustainable energy. In practice, people use the terms Windmill and Wind Turbine interchangeably, but these two terms are different from each other. Windmill and wind turbines are different from each other in structure and application. Windmill is a technology in which energy of wind is used to mill grains, moving water, driving machines, etc. On the other hand, a wind turbine converts the wind energy into electrical energy by driving a generator connected to it. In this article, we will discuss all the noticeable differences ... Read More
In Python, a list is an ordered sequence that can hold several object types such as integer, character, or float. In other programming languages, a list is equivalent to an array. Concatenation of lists is an operation that adds the elements of one list to the end of another. We're discussing list data structures here, therefore we'll join the elements of one list to the end of another. In this article, we will show you how to concatenate lists in python. The following are the different methods to accomplish this task − Using Concatenation(+) Operator Using For Loop(Naive Method) ... Read More
In atomic structure, valance band and conduction band are the terms used to represent the energy levels of the subatomic particles, usually electrons. While analyzing the atomic structures, we found that the valance band and conduction band are separated by a certain amount of energy depending on the type of material. For example, in metals, these are touching each other; in semi-conductors, these are separated by a moderate amount of energy; and in case of insulators, this separation is very large. The energy gap between the valance band and the conduction band is known as forbidden energy gap. The diagram ... Read More
In electrical and electronics engineering, transformers and amplifiers play a crucial role in several circuits. At first sight, the function of a transformer and an amplifier may seem similar, that is, increasing the level of voltage. But, a transformer can reduce the level of voltage as well, whereas an amplifier cannot. In this article, we will discuss all the key differences between a transformer and an amplifier by considering different parameters such as basic definition, circuit components, primary function, applications, etc. But before that, let's check some of the basics of transformers and amplifiers so that it becomes easier ... Read More
A rotating electric machine is the one which has moving parts. Every rotating electrical machine such as motor and generator consists of two major parts namely stator and rotor. As their name implies, the stator is that part of the machine which is stationary or non-movable, whereas the rotor is the part which can move or rotate freely. This article is meant for explaining the differences between stator and rotor of an electrical machine. But before going into the comparison of stator and rotor we shall discuss what the stator and rotor are. What is Stator of Electrical Machine? ... Read More
In this article, we will explain to you the built-in class attributes in python The built-in class attributes provide us with information about the class. Using the dot (.) operator, we may access the built-in class attributes. The built-in class attributes in python are listed below − Attributes Description __dict__ Dictionary containing the class namespace __doc__ If there is a class documentation class, this returns it. Otherwise, None __name__ Class name. __module__ Module name in which the class is defined. This attribute is "__main__" in interactive mode. __bases__ ... Read More
In electrical and electronics engineering, a Relay is an electrically operated switch which is used to connect or disconnect two circuits. Since the operation of a Relay is governed by an electric control signal, hence it can be operated automatically. Basically, the relays are designed for switching of high power circuits by using low power electric signals. Depending on the technology used, the relays can be broadly classified into two types namely Electromagnetic Relays Static or Solid-State Relays In this article, we will highlight all the key differences between an electromagnetic relay and a solid state relay ... Read More