Found 33676 Articles for Programming

Kotlin Program to Count Number of Digits in an Integer

AmitDiwan
Updated on 17-Oct-2022 08:18:59

768 Views

In this article, we will understand how to count the number of digits in an integer. The digits in an integer are counted using a loop and a counter. Below is a demonstration of the same − Suppose our input is − Number : 15161718 The desired output would be − The result is : 8 Algorithm Step 1 − START Step 2 − Declare two integer values namely count and myInput. Step 3 − Define the values Step 4 − Using a while loop, divide the input value by 10 until the number is reduced to ... Read More

Kotlin Program to Display Fibonacci Series

AmitDiwan
Updated on 17-Oct-2022 08:16:04

3K+ Views

In this article, we will understand how to find even sum of Fibonacci series till number N. A Fibonacci series is sequence of numbers formed by the sum of its two previous integers. An even Fibonacci series is all the even numbers of the Fibonacci series. A Fibonacci series till number N i.e., 10 can look like this − 0 1 1 2 3 5 8 13 21 34 Below is a demonstration of the same − Suppose our input is − The input : 15 The desired output would be − The Fibonacci series till 15 terms: 0 ... Read More

Why TensorFlow is So Popular and Tensorflow Features

AmitDiwan
Updated on 14-Oct-2022 11:37:36

361 Views

Tensorflow is an open-source Machine learning framework that helps develop models, train pre-trained models by providing high level APIs. TensorFlow is an end-to-end platform to easily build and deploy Machine Learning models. TensorFlow makes it easy for novices and experts to create machine learning models for cloud, desktop, mobile, and web. Features of TensorFlow Let us now see the features of TensorFlow that also explains why it is widely popular Build and Train models easily TensorFlow offers multiple levels of abstraction to make it quick for you to choose the correct one. Build and train models by using the high-level ... Read More

Introduction to TensorFlow Lite

AmitDiwan
Updated on 14-Oct-2022 09:02:44

502 Views

TensorFlow Lite is a mobile library designed to deploy models on mobile, microcontrollers and edge devices. It comes with tools that enable on-device machine learning on mobile devices using 5 aspects − latency, privacy, connectivity, size, and power consumption. It provides support on Android, iOS, embedded Linux and microcontrollers. Supports multiple languages such as Java, Swift, Objective C, C++, and Python. Also provides hardware acceleration and model optimization. The documentation provides end-to-end examples for machine learning projects such as image classification, object detection, question answering, pose estimation, text classification, and many more on different platforms. There are two aspects to ... Read More

Python Program to calculate the logarithm gamma of the given number

Alekhya Nagulavancha
Updated on 14-Oct-2022 08:30:21

758 Views

In mathematics, the gamma function is said to be an extension to the factorial of any given number. However, as the factorial is only defined for real numbers, the gamma function exceeds to define the factorial on all complex numbers except the negative integers. It is represented by − Γ(x) = (x-1)! The logarithm gamma function comes into picture as the gamma function grows rapidly only larger numbers, so applying logarithm to the gamma will slow it down a lot. It is also known as the natural logarithm gamma of a given number. log(Γ(x)) = log((x-1)!) In python ... Read More

Python Program to calculate the volume and area of the Cylinder

Alekhya Nagulavancha
Updated on 14-Oct-2022 08:05:51

3K+ Views

In this article, we will look into a python program to calculate the volume and area of a cylinder. A cylinder is defined as a 3D object that has two circles connected with a rectangular surface. The special thing about a cylinder is that even though it is measured using just two dimensions, i.e. the height and radius, the cylinder is considered a three-dimensional figure as it is measured in xyz coordinate axes. The area of the cylinder is calculated is two ways− area of the lateral surface and area of the total surface. Lateral surface area is only the ... Read More

Python Program to calculate the volume of Cube

Alekhya Nagulavancha
Updated on 14-Oct-2022 07:57:45

6K+ Views

A cube is a three-dimensional solid figure with six faces, twelve edges and eight vertices. This geometrical figure has equal sized edges, hence making all its dimensions − length, width and height − equal. The idea of calculating the volume of a cube can be understood in a simple way. Consider a real-time situation where a person a moving houses. Suppose they use a hollow cube shaped cardboard box to place their things in it, the amount of space present to fill it up is defined as the volume. The mathematical formula to calculate the volume of a cube ... Read More

Python Program to calculate the area of Cube

Alekhya Nagulavancha
Updated on 14-Oct-2022 07:52:57

3K+ Views

To calculate the area of a cube, let us first revise the concept of a cube. A cube is a geometrical figure containing three dimensions: length, width, and height with all the dimensions having equal measurements. It has six square faces, four of which are lateral surfaces and the other two are the cube's top and bottom surfaces. The requirement to find the surface area is just knowing the length a single edge. The area of a cube is found using the following steps − Find the area of one square face with the given edge Four times ... Read More

Kotlin Program to Generate Multiplication Table

AmitDiwan
Updated on 13-Oct-2022 13:39:41

987 Views

In this article, we will understand how to print a multiplication table. Multiplication table is created by iterating the required input 10 times using a for loop and multiplying the input value with numbers from 1 to 10 in each iteration. Below is a demonstration of the same − Suppose our input is − Input : 16 The desired output would be − The multiplication table of 16 is : 16 * 1 = 16 16 * 2 = 32 16 * 3 = 48 16 * 4 = 64 16 * 5 = 80 16 * 6 = ... Read More

Kotlin Program to Round a Number to n Decimal Places

AmitDiwan
Updated on 13-Oct-2022 13:38:07

2K+ Views

In this article, we will understand how to round a number to n decimal places. Rounding of decimal values are done using the ceil() or floor() functions. Below is a demonstration of the same − Suppose our input is Input : 3.1415 The desired output would be − Output : 3.2 Algorithm Step 1 − START Step 2 − Declare a float value namely myInput. Step 3 − Define the values Step 4 − Use format() to alter the number of decimal places required. Store the result. Step 5 − Display the result Step 6 − Stop ... Read More

Advertisements