Calculate Standard Deviation in Python

Alekhya Nagulavancha
Updated on 26-Oct-2022 10:07:50

14K+ Views

In this article, we will learn how to implement a python program to calculate standard deviation on a dataset. Consider a set of values plotted on any coordinate axes. Standard deviation of these set of values, called population, is defined as the variation seen among them. If the standard deviation is low, the values are plotted closely to the mean. But if the standard deviation is high, the values are dispersed farther from the mean. It is denoted by square root of the variance of a dataset. There are two types of standard deviations − The population standard deviation is ... Read More

Calculate Cube Root of a Given Number in Python

Alekhya Nagulavancha
Updated on 26-Oct-2022 09:50:03

17K+ Views

Mathematically, a cube root of a certain number is defined as a value obtained when the number is divided by itself thrice in a row. It is the reverse of a cube value. For example, the cube root of 216 is 6, as 6 × 6 × 6 = 216. Our task in this article is to find the cube root of a given number using python. The cube root is represented using the symbol “$\mathrm{\sqrt[3]{a}}$”. The 3 in the symbol denotes that the value is divided thrice in order to achieve the cube root. There are various ways in ... Read More

Calculate Volume and Area of Sphere in Python

Alekhya Nagulavancha
Updated on 26-Oct-2022 09:25:35

6K+ Views

A sphere (solid) is usually considered a two-dimensional figure even though the figure is seen in three planes from its center. The main reason for this is that, a sphere is only measured using its radius. However, a hollow sphere is considered a three-dimensional figure since it contains space within its spherical walls and has two different radii to measure its dimensions. The spherical figure only has total surface area since there is only one dimension to measure the entire object. The formula to calculate the surface area of a sphere is − Area of solid sphere − $\mathrm{{4\pi ... Read More

Calculate Area of the Rhombus in Python

Alekhya Nagulavancha
Updated on 26-Oct-2022 09:23:37

2K+ Views

A rhombus is a four-sided polygon that has all equal edges and perpendicular diagonals. It is also called as a special type of parallelogram, since a parallelogram has equal opposite sides and is shaped similar. The area of a rhombus is calculated with its diagonals, as they form four triangles within the figure. The combination of the area of all those triangles will give us the area of a rhombus. The mathematical formula is − Area − $\mathrm{{\frac{p\:\times\:q}{2}}}$ Where, p and q are the lengths of diagonals. Input Output Scenarios Let us look at some input output scenarios to ... Read More

Check If an Image Has Crop Applied Using Fabric.js

Rahul Gurung
Updated on 26-Oct-2022 09:04:31

280 Views

In this tutorial, we are going to show how you can check if an Image has crop applied using FabricJS. We can create an Image object by creating an instance of fabric.Image. Since it is one of the basic elements of FabricJS, we can also easily customize it by applying properties like angle, opacity etc. In order to find whether an Image has crop applied, we use the hasCrop method. This method returns false in case of crop is not applied, or the applied crop value in case if it is applied. Syntax hasCrop(): Boolean | Number Using the ... Read More

Change Image Source Using Fabric.js

Rahul Gurung
Updated on 26-Oct-2022 08:58:11

2K+ Views

In this tutorial, we are going to learn how to change the source of an Image using FabricJS. Source can be a new url of image also. We can create an Image object by creating an instance of fabric.Image. Since it is one of the basic elements of FabricJS, we can also easily customize it by applying properties like angle, opacity etc. In order to change the source of an Image, we use the setSrc method. Syntax setSrc(src: String, callback: function, options: Object): fabric.Image Parameters src − This parameter accepts a String which denotes the source url string. ... Read More

Calculate Volume and Area of Cone in Python

Alekhya Nagulavancha
Updated on 26-Oct-2022 08:57:59

4K+ Views

A cone is a three-dimensional figure that is formed by connecting infinite line segments from a common point to all the points in a circular base. This common point is also known as an apex. The cone is measured using three dimensions: radius of its circular base, height and lateral height. The difference between a cone’s height and lateral height is such that− height is measured from the apex to the center of the circular base, while lateral height is a length of line segments connecting apex and any point on the circular base. The lateral surface area, also ... Read More

Center Image Object Vertically on Canvas Using Fabric.js

Rahul Gurung
Updated on 26-Oct-2022 08:35:13

302 Views

In this tutorial, we are going to show how you can center an Image object vertically on current viewport of canvas using FabricJS. We can create an Image object by creating an instance of fabric.Image. Since it is one of the basic elements of FabricJS, we can also easily customize it by applying properties like angle, opacity etc. In order to center an Image object vertically on current viewport of canvas, we use the viewportCenterV method. Syntax viewportCenterV(): fabric.Object Default appearance of the Image object Example Let’s see a code example to see how our Image object looks when ... Read More

Case Sensitive String Comparison in JavaScript

Shubham Vora
Updated on 26-Oct-2022 08:33:18

4K+ Views

This tutorial will guide you to learn case-sensitive string comparison in JavaScript. JavaScript is case-sensitive. Keywords, variables, function names, and any identifiers in JavaScript must be in the required case. For example, for keyword cannot be written as For or FOR. What are strings in JavaScript? A string is a collection of one or more characters, which could be letters, numbers, or symbols. Strings are immutable primitive data types in JavaScript, which implies they can never change. Text can be stored and modified using JavaScript strings. Any number of characters enclosed in quotations is a JavaScript string. How can we ... Read More

Center Image Object on Current Viewport of Canvas Using Fabric.js

Rahul Gurung
Updated on 26-Oct-2022 08:30:51

1K+ Views

In this tutorial, we are going to learn how to center an Image object on current viewport of canvas using FabricJS. We can create an Image object by creating an instance of fabric.Image. Since it is one of the basic elements of FabricJS, we can also easily customize it by applying properties like angle, opacity etc. In order to center an Image object on the current viewport of canvas, we use the viewportCenter method. Syntax viewportCenter(): fabric.Object Default appearance of the Image object Example Let’s see a code example to see how our Image object looks when the viewportCenter ... Read More

Advertisements