
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 10400 Articles for Python

3K+ Views
Python has ability to solve the mathematical expression, statistical data by importing statistic keyword. Python can do various types of statistical and mathematical operations. These functions calculate the average value from a sample or population. mean () Arithmetic mean value (average) of data. harmonic_mean () Harmonic mean value of data. median () Median value (middle value) of data. median__low() Low median value of data. median__high() High median value of data. median__grouped() Median of the grouped data and also calculate the 50th percentile of the grouped data. ... Read More

439 Views
This article teaches you how to write a Python program to find the size of the largest subset of anagram words Every character of the rearranged string or number must also be a component of another string or number in order for the condition of an anagram to exist. To put it another way, a string is said to be an anagram of another if the second is just the first string rearranged. As an illustration, the words The program and rogPrma are anagrams, as are the words Code and doCe. Input-Output Scenarios Lets take an input and its output ... Read More

4K+ Views
Matrix refers to a collection of numbers arranged in rows and columns to form a rectangular array. The numbers make up the matrix's entries, or elements. We need to create a Python function to determine whether two given matrices are identical. In other words, we say that two matrices are identical if all of the elements in their respective places are the same. Identical Matrices Two matrices are only considered equal if and when they meet the requirements listed below − There should be an equal number of rows and columns in each matrices. The identical corresponding items should ... Read More

1K+ Views
A "word cloud" is a visual representation of text data, where the size of each word indicates its frequency or importance within the dataset. It helps us to identify the most common and important words in a text. It is typically used to describe/denote big data in a word. In this article, we will create a word cloud on the Python programming language, and the data is accessed from Wikipedia. Modules to create a Word Cloud in Python Following are the modules required to create a word cloud in Python : Install wordcloud Before installing the word cloud module, you have ... Read More

2K+ Views
In general, we look at some external websites to convert our files to PDF format; instead, we can convert them using Python on our own. In this article, we will understand the steps to convert the HTML (Hyper Text Markup Language) to PDF using Python code. Steps to convert HTML to PDF Following are the steps to convert the HTML file to PDF using Python: Step 1: Installation Download the pdfkit library by running the following command in the command prompt: pip install pdfkit Step 2: Download wkhtmltopdf Following are the steps to download wkhtmltopdf: ... Read More

1K+ Views
In this article, we will sort a list according to the second element in the sublist. Let’s say we have the following list − [['jack', 50], ['antony', 20], ['jones', 87], ['gary', 70], ['tom', 90], ['sam', 110], ['warner', 65]] The output should be the following i.e. sorted according to the second element − [['antony', 20], ['jack', 50], ['warner', 65], ['gary', 70], ['jones', 87], ['tom', 90], ['sam', 110]] Python program to sort a list according to the second element in the sublist using the sort() method Example # Custom Function def SortFunc(sub_li): sub_li.sort(key = lambda x: x[1]) return sub_li ... Read More

1K+ Views
We have to enter our height and weight. Our task is to calculate BMI using formula. Algorithm Step 1: input height and weight of your body. Step 2: then applying the formula for calculation BMI. Step 3: display BMI. Example Code height = float(input("Enter your height(m): ")) weight = float(input("Enter your weight(kg): ")) print("Your BMI is: ", round(weight / (height * height), 2)) Output Enter your height (m): 5.8 Input your weight (kg): 64 Your body mass index is: 1.9

20K+ Views
Given two user input matrix. Our task is to display the addition of two matrix. In these problem we use nested List comprehensive. Algorithm Step1: input two matrix. Step 2: nested for loops to iterate through each row and each column. Step 3: take one resultant matrix which is initially contains all 0. Then we multiply each row elements of first matrix with each elements of second matrix, then add all multiplied value. That is the value of resultant matrix. Example Code # Program to multiply two matrices A=[] n=int(input("Enter N for N x N matrix: ")) ... Read More

762 Views
What is Modular Exponentiation? To calculate Modular exponentiation, we need to raise a base to an exponent and then calculate the modulus of the result. This includes 3 integers: base, exponent, and modulo. Following is the syntax of the modular exponentiation in Python - (base**exponent) % modulo For instance, consider (2^5) % 5, which indicates 2 raised to the power of 5, which results in 32; When the modulo operation is performed, it returns the remainder, i.e., 32 % 5 is 3. Modular Exponentiation using Recursive Function A function that calls itself is known as a recursive function. Following is ... Read More