
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 26504 Articles for Server Side Programming

471 Views
In addition to python’s own libraries, there are many external libraries created by individual authors which do a great job of creating additional features in python. Xlsx library is one such library which not only creates excel files containing data from python programs but also creates charts.Creating Pie ChartIn the below example we will create a pie chart using the xlsxwriter writer. Here we first define a workbook then add a worksheet to it in the next step we define the data and decide on the columns where the data will be stored in an excel file based on those ... Read More

203 Views
A python list is a collection data type that is ordered and changeable. Also, it allows duplicate members. It is the most frequently used collection data type used in Python programs. We will see how we can add an element to a list using the index feature.But before adding the element in an existing link, let's access the elements in a list using the index feature.Accessing List using Indexevery element in the list is associated with an index and that is how the elements remain ordered. We can access the elements by looping through the indexes. The below program prints ... Read More

7K+ Views
There are occasions when we need to show the same number or string multiple times in a list. We may also generate these numbers or strings for the purpose of some calculations. Python provides some inbuilt functions which can help us achieve this.Using *This is the most used method. Here we use the * operator which will create a repetition of the characters which are mentioned before the operator.Example Live Demogiven_value ='Hello! ' repeated_value = 5*given_value print(repeated_value)Running the above code gives us the following result:Hello! Hello! Hello! Hello! Hello!Using repeatThe itertools module provides repeat function. This function takes the repeatable string ... Read More

400 Views
In this tutorial, we are going to write code to find the sum of the series n + nn + nnn + ... + n (m times). We can do it very easily in Python. Let's see some examples.Input: n = 1 m = 5 Series: 1 + 11 + 111 + 1111 + 11111 Output: 12345AlgorithmFollow the below steps to solve the problem.1. Initialise the n and m. 2. Initialise total to 0. 3. Make the copy of n to generate next number in the series. 4. Iterate the loop m times. 4.1. Add n to the total. ... Read More

2K+ Views
Boolean indexing helps us to select the data from the DataFrames using a boolean vector. We need a DataFrame with a boolean index to use the boolean indexing. Let's see how to achieve the boolean indexing.Create a dictionary of data.Convert it into a DataFrame object with a boolean index as a vector.Now, access the data using boolean indexing.See the example below to get an idea.Exampleimport pandas as pd # data data = { 'Name': ['Hafeez', 'Srikanth', 'Rakesh'], 'Age': [19, 20, 19] } # creating a DataFrame with boolean index vector data_frame = pd.DataFrame(data, index = [True, False, True]) ... Read More

598 Views
We can perform the calendar operations using the calendar module in Python. Here, we are going to learn about the different methods of calendar class instance.calendar.calendar(year)The calendar class instance returns the calendar of the year. Let's see one example.Example Live Demo# importing the calendar module import calendar # initializing year year = 2019 # printing the calendar print(calendar.calendar(year))OutputIf you run the above code, you will get the following results.calendar.firstweekday()The method calendar.firstweekday() returns the first weekday in the week i.e.., MONDAY.Example Live Demo# importing the calendar import calendar # getting firstweekday of the year print(calendar.firstweekday())OutputIf you run the above program, you will get ... Read More

595 Views
We are going to explore different methods of calendar module in this tutorial. Let's see one by one.calendar.monthrange(year, month)The method calendar.monthrange(year, month) returns starting weekday number and number of days of the given month. It returns two values in a tuple. Let's see one example.Example Live Demo# importing the calendar module import calendar # initializing year and month year = 2019 month = 1 # getting the tuple of weekday and no. of days weekday, no_of_days = calendar.monthrange(year, month) print(f'Weekday number: {weekday}') print(f'No. of days: {no_of_days}')OutputIf you run the above code, you will get the following results.Weekday number: 1 No. of ... Read More

170 Views
In this tutorial, we are going to discuss the string method str.casefold(). It doesn't take any arguments. The return value of the method is a string that is suitable for the caseless comparisons.What are caseless comparisons? For example, the german lower case letter ß is equivalent to ss. The str.casefold() method returns the ß as ss. It converts all the letters to lower case.Example Live Demo# initialising the string string = "TUTORIALSPOINT" # printing the casefold() version of the string print(string.casefold())OutputIf run the above program, you will get the following result.tutorialspointLet's see the example where caseless comparison works. If you directly compare ... Read More

844 Views
Matrix MultiplicationNow procedure of Matrix Multiplication is discussed. The Matrix Multiplication can only be performed, if it satisfies certain condition. Suppose two matrices are P and Q, and their dimensions are P (a x b) and Q (z x y) the resultant matrix can be found if and only if b = x. Then the order of the resultant matrix R will be (m x q).AlgorithmmatrixMultiply(P, Q): Assume dimension of P is (a x b), dimension of Q is (z x y) Begin if b is not same as z, then exit otherwise define R matrix as (a ... Read More

120 Views
In this tutorial, we will be discussing a program to convert a BST to a binary tree such that the sum of all greater keys is added to every key.For this, we will be provided with a Binary Search tree. Our task is to convert that tree into a binary tree with the sum of all greater keys added to the current key. This will be done by the reverse in order of the given BST along with having the sum of all the previous elements and finally adding it to the current element.Example Live Demo#include using namespace std; //node ... Read More