Python program to find the square root of a number

A square root of a number X is a number Y if the square of Y is equal to X or the value of Y * Y is equal to X. In this tutorial, we will learn how to find out the square root of a number in Python.

Read

Python program to find the multiplication of all elements in a list

Python list is one of the most used datatypes. A list can contain an infinite number of items. It the list is empty, it is called an empty list. List items have different datatypes i.e. it can hold elements of string, integer, float or any other types.

Read

Python 3 Ordered Dictionary (OrderedDict) with example

Learn what is ordered dictionary in python with different examples. Examples to create normal dictionary, ordered dictionary, pop item from ordered dictionary and how to compare ordered dictionaries.

Read

Python tutorial to remove duplicate lines from a text file

Learn how to remove all duplicate lines from a text file in Python. The program will remove all duplicate lines from an input file and write it to an output file. Also learn how to handle exceptions for invalid file path.

Read

Java program to swap first and last character of a string

In this tutorial, we will learn how to swap the first and last character in Java. The user will enter one string, our program will swap the first and last character of that string and print out the result. Let's take a look at the program first :.

Read

C program to concatenate two strings without using strcat()

In this tutorial, we will learn how to concatenate two strings without using strcat() function in C programming language. We will take the input from the user. User will enter both strings, our program will concatenate the strings and print out the result. To store the strings, we will use two arrays. To read the strings, we will use gets() function. Let's take a look into the program first :.

Read

Python program to find the maximum and minimum element in a list

In this tutorial, we will learn how to find the maximum and minimum number in a python list. Python list can hold items of any data types. All items are separated by a comma and placed inside a square bracket. We can access any item by using its index. The index starts at 0. The index for the first element is 0, the index of the second element is 1 etc.

Read

How to copy or clone a list in python

In this tutorial, we will learn how to copy or clone a list in python. After python 3.3, one new inbuilt method was added to copy a list. We will see two different processes to copy a list in python. Method 1 can be used in both python 2 and 3. But method 2 can only be used with python 3.

Read

Java program to find the total count of words in a string

In this tutorial, we will learn how to count the total number of words in a string in Java. The user will enter one string. Our program will count the total number of words in the string and print out the result.

Read

Java program to find the sublist in a list within range

In this tutorial, we will learn how to find one sublist of a list within a range. The user will enter the starting index and end index of the list. We will print out the sublist using this starting and ending index. Let's take a look at the Java program first :.

Read