
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

553 Views
In Haskell, we can get the the successor of an integer number using library function like succ, addition and fromMaybe function. In the first example, we are going to use (succ number) function and in the second example, we are going to use addition while in third example, we are going to use (fromMaybe 0 (succMaybe x)) function. Algorithm Step 1 − Program execution will be started from main function. The main() function has whole control of the program. It is written as main = do. It calls the succ function with the value and prints its ... Read More

241 Views
In Haskell, we can use library function like pred, subtraction and fromMaybe to get the predecessor of an integer number. In the first example, we are going to use (pred number) function and in the second example, we are going to use subtraction while in third example, we are going to use (fromMaybe 0 (predMaybe x)) function. Algorithm Step 1 − Program execution will be started from main function. The main() function has whole control of the program. It is written as main = do. It calls the pred function with the value and prints its predecessor ... Read More

2K+ Views
In Haskell, we have library function like, by using Mod and Rem function to check if the given number is odd or not. In the first example, we are going to use (isOdd n = n `mod` 2 /= 0) function and in the second example, we are going to use (isOdd n = (n `rem` 2) == 1) function. Algorithm Step 1 − The isOdd function is defined using mod function as, isOdd n = n `mod` 2 /= 0. Step 2 − Program execution will be started from main function. The main() function has ... Read More

53K+ Views
In Python, there are several ways to input a string from the user. The most common method is by using the built-in function input(). This function allows the user to enter a string, which is then stored as a variable for use in the program. ExampleHere's an example of how to input a string from the user in Python −# Define a variable to store the input name = input("Please enter your name: ") # Print the input print("Hello, " + name + "! Good to see you.") OutputThe above code generates the following output for us −Please enter your name: ... Read More

2K+ Views
In Haskell, we can use divMod and quotRem functions to get the division and remainder of a given number. In the first example, we are going to use (divMod x y) function and in the second example, we are going to use (quotRem 20 7) function. Algorithm Step 1 − Program execution will be started from main function. The main() function has whole control of the program. It is written as main = do. Step 2 − The variables named, “x” and “y” are being initialized. The interal function will divide them by taking them as argument. Step ... Read More

47K+ Views
A variable is a way of storing values in the Python programming language so they can be used later in the program. These variables frequently find use within functions, necessitating the need to access a variable from another function. We shall examine Python's methods for calling a variable from another function in this article. In Python, calling a variable from another function can be done in one of two ways − Global Variables Return Statement Let's take a closer look at each of these techniques − Global Variables A global variable is a special kind of computer variable ... Read More

16K+ Views
Developers that want to combine the strength of a powerful text editor with the adaptability of Python programming can use Atom as their development environment. Python can be used in Atom to write, edit, and run code in one location, speeding up the development process. We'll walk you through the quick setup procedures for Python in Atom in this article. Step 1: Install Atom You must first get your hands on the Atom text editor before you can begin running Python in Atom. Globally, developers use Atom, a very well-liked, open-source, free text editor created by GitHub. Atom can be ... Read More

176 Views
In Haskell, we can use realPart function and pattern matching to get the real part from a complex number. In the first example we are going to use (realPart c) function and in the second example, we are going to use patter matching as (x:+_) = c. Algorithm Step 1 − The Data.Complex module is imported to work over the complex numbers. Step 2 − Program execution will be started from main function. The main() function has whole control of the program. It is written as main = do. Step 3 − The variable named, “c” is being ... Read More

645 Views
In the current economy, data science has emerged as one of the most sought-after and lucrative jobs. In the current economy, data science has emerged as one of the most sought-after and lucrative jobs. Because there is an increasing amount of data being produced, businesses are looking for people who are skilled at analyzing, understanding and presenting data in a way that may help them make decisions. The data science business frequently uses Python as a programming language. It is a popular option for many data scientists because of the abundance of libraries and tools available for ... Read More

183 Views
In Haskell, we can use isIEEE, isInfinite and isNaN functions to check whether a given number is finite or not. In the first example we are going to use (isIEEE n) function with if-else statement and in the second example, we are going to use (isInfinite n) function. And in third example, we are going to use (isNaN) function along with (isInfinite n) function. Algorithm Step 1 − Program execution will be started from main function. The main() function has whole control of the program. It is written as main = do. Step 2 − The variable named, ... Read More