
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 33676 Articles for Programming

154 Views
This tutorial will help us in reading the height of a person and printing if the person is taller, dwarf or average height person on being compared. The height value (in centimeters) is passed as argument to the function defined and then the height is being compared with the condition defined in Haskell. And the final output is displayed. Algorithm Step 1 − Program execution will be started from main function. The main() function has whole control of the program. Step 2 − Create user defined function to perform the task Step 3 − The if-else statement is defined ... Read More

476 Views
This tutorial will help us in extracting the last two digits from the given year. The year value is passed as an argument to the function defined and then the last two digits are extracted by using various methods in Haskell. And the final output is displayed. For example, For entered year = 2023, the last two digits = 23. Algorithm Step 1 − The Data.Char module is imported to use digitToInt function. Step 2 − The extractLastTwoDigits function is defined Step 3 − Program execution will be started from main function. The main() function has whole control of ... Read More

277 Views
This tutorial will help us in reading the x and y coordinates and determine its quadrant. If both the coordinates are positive, the point lies in first quadrant; if x coordinate is positive and y coordinate is negative, the point lies in fourth quadrant ; if x coordinate is negative and y coordinate is positive, the point lies in second quadrant and if both the coordinates are negative, then point lies in third quadrant. Algorithm Step 1 − The quadrant function is defined using certain conditions on x and y coordinates. Step 2 − Program execution will be ... Read More

283 Views
This tutorial will help us in calculating the volume and area of Sphere. The volume of a sphere is a measure of the amount of space inside the sphere. And area involves the surface area of the sphere. Method 1: Using the User-defined Function In this method, we will see two examples where we have used user-defined function with different techniques. Algorithm Step 1 − The Text.Printf module is imported. Step 2 − The volume and area functions are defined on the basis of simple mathematical formula as volume r = (4.0 / 3.0) * pi * (r ^ ... Read More

257 Views
This tutorial will help us in calculating the volume and area of the Cone. The volume of a cone is a measure of the amount of space inside the cone. And area involves the surface area of the cone that is obtained from the lateral area of a cone. The formula for the volume of a cone is V = (1/3) * π * r^2 * h, where r is the radius of the base of the cone, h is the height of the cone, and π is approximately equal to 3.14. And the formula for the surface area of ... Read More

264 Views
This tutorial will help us in calculating the volume, diagonal, and area of the Cuboids. The volume of a cuboid is a measure of the amount of space inside the cuboid. And area involves the surface area of the cuboid. The diagonal of a cuboid is a line segment connecting two opposite vertices of the cuboid. It is also known as the "space diagonal" or "body diagonal" of the cuboid. Algorithm Step 1 − The volume, diagonal and area functions are defined on the basis of simple mathematical formula as volume l w h = l * w ... Read More

312 Views
This tutorial will help us in calculating the volume and area of the Cylinder. The volume of a cylinder is a measure of the amount of space inside the cylinder. The area involves the surface area of the cylinder. The formula for the volume of a cylinder is the product of the base area of the cylinder, which is given by πr^2 and the height h. The formula for the surface area of a cylinder is the sum of the areas of the two circular faces and the area of the rectangular lateral surface. Algorithm Step 1 − The ... Read More

67K+ Views
In this article, we will learn how to add a character to a specific position in a string in Python. Methods Used The following are the various methods to accomplish this task − Using the '+' operator Using join() function Using format() function Method 1: Using the '+' operator We can concatenate strings and characters using the symbol "+" at the required positions. Adding Character at the End of a String Algorithm: Following are the Algorithms/steps to be followed to perform the desired task. − Create a variable to store an input string. Use the "+" operator ... Read More

507 Views
TypeScript allows us to create a new type from the existing types, and we can use the utility types for such transformation. There are various utility types that exist in TypeScript, and we can use any utility type according to our requirements of the type transformation. In this tutorial, we will learn about the different utility types with examples. Partial Type in TypeScript The Partial utility type transforms all the properties of the current type to optional. The meaning of the partial is either all, some, or none. So, it makes all properties optional, and users can use it while ... Read More

2K+ Views
In TypeScript, a tuple is an object which contains the values of different data types. The length of a tuple is always pre-defined. It is similar to an array, but the array contains the values of only one data type, and the tuple contains values of multiple data types. Destructuring the tuple means getting the values from the tuple in separate variables. For example, we need to use tuple values multiple times in the code block. We can get all values in separate variables and use variables whenever we require tuple values, rather than every time accessing values from tuple ... Read More