Tag python programs

Python programming
python tutorials

Transpose Matrix using Python

Transpose Matrix using Python

Transpose Matrix is one of the popular problems in coding interviews. This problem requires you to manipulate a matrix by flipping its rows and columns. So, if you want to know how to transpose a matrix, this article is for…

Buddy Strings using Python

Buddy Strings using Python

Buddy Strings is a popular problem in coding interviews. In this problem, you need to check if it is possible to get two strings, different from exactly a swap of two letters. So, if you want to learn how to…

Binary Search using Python

Binary Search using Python

Binary Search is an algorithm used to find an element in a sorted array by repeatedly dividing the search interval in half. In coding interviews, there is always a question on any search algorithm. So, if you want to learn…

Set Mismatch using Python

Set Mismatch using Python

Set Mismatch is a popular question in coding interviews. In this problem, you need to find two numbers in an array that are missing or duplicated. So, if you want to know how to solve this problem using Python, this…

Reorder Routes using Python

Reorder Routes using Python

Reorder routes to make all paths lead to the city zero is a popular question in coding interviews. In this problem, you need to reorder the connections between the cities so that all paths lead to the city labelled as…

Relative Ranks using Python

Relative Ranks using Python

The problem of relative ranks is a popular coding interview question. Here you will be given an array of integers representing the scores of athletes, assuming that the athletes with the 1st rank will have the highest score, and you…

Hamming Distance using Python

Hamming Distance using Python

The problem of hamming distance between two integers is a popular coding interview question. Here you will be given two integers, and you need to calculate the number of positions at which the corresponding bits of the integers are different. So, if…

Assign Cookies using Python

Assign Cookies using Python

The problem of assigning cookies is a popular coding interview question. Here you will be given a list of children with their greed factors and a list of cookies with their sizes. To solve this problem, you need to assign…

Counting Bits using Python

Counting Bits using Python

Counting Bits is a popular coding interview question. Here you will be given an integer, and you have to return an array of length (length of the integer + 1) by counting the number of 1’s in the binary representation…

Move Zeroes using Python

Move Zeroes using Python

Moving zeroes is one of the popular questions in coding interviews. Here we need to move all the 0’s in an array to the end of the array while keeping the order of non-zero elements the same. So, if you…

Ugly Number using Python

Ugly Number using Python

Ugly numbers are the numbers whose prime factors are limited to 2, 3, and 5. Finding the Ugly number is a popular question in coding interviews. Here you need to check if a number is an ugly number or not.…

Add Digits using Python

Add Digits using Python

The problem of adding digits is a popular coding interview question. Here we need to add all the digits of the integer till we get to a single-digit integer. So, if you want to know how to solve this problem using…

Power of Two using Python

Power of Two using Python

The problem of Power of Two is a popular coding interview question. Here we need to check whether the input value is the power of two or not. So, if you want to know how to solve this problem using Python, this…

Majority Element using Python

Majority Element using Python

The majority element problem is one of the popular coding interview questions. Here we need to find the element that appears more than the other element in an array. So, if you want to know how to solve this problem,…

Single Number using Python

Single Number using Python

The Single Number problem is one of the popular coding interview questions. Here you will be given an array of integers where each item appears twice except for one that we need to find. So, if you want to know how…

Pascal’s Triangle using Python

Pascal's Triangle using Python

Pascal’s Triangle is one of the popular coding interview questions. It is asked in the coding interviews by FAANG companies many times. In Pascal’s Triangle problem, we need to return the number of rows of a Pascal’s Triangle. So, if…

Climbing Stairs using Python

Climbing Stairs using Python

Climbing Stairs is one of the popular coding interview questions. It is asked in the coding interviews by FAANG companies many times. In the climbing stairs problem, you need to count the number of distinct ways to climb to the…

Square Root using Python

Square Root using Python

Finding the square root of a number is asked in the coding interviews by FAANG companies many times. A square root is a number that produces the specified value when multiplied by itself. For example, 5×5 gives 25, so the square root…

Plus One using Python

Plus One using Python

The Plus One problem is one of the popular coding interview questions. It is asked in the coding interviews by companies like FAANG many times. Here you need to increment the last digit of an array by one and return…

Two Sum using Python

Two Sum using Python

Two Sum is a popular problem in Leetcode. It is often asked in coding interviews from companies like FAANG. Here you need to return the indices of integers from an array whose addition equals the target value. So, if you…

Print Emojis using Python

Print Emojis using Python

Emojis are used to express our emotions while writing a message or any piece of text. If you want to learn how to display emojis in the output using the Python programming language, this article is for you. In this…

Group Anagrams using Python

Group Anagrams using Python

Anagrams are words formed by rearranging the letters of another word, For example, car and arc, cat and act, etc. Grouping anagrams is one of the popular questions in coding interviews. So if you want to learn how to solve…

Best Python Courses in 2022

Best Python Courses in 2022

Python is one of the most valuable programming languages in the industry. It is preferred by data science professionals and web developers. If you are looking for a complete course to learn Python, this article is for you. This article…

Generate Text using Python

Generate Text using Python

Text generation involves generating text using machine learning techniques. The purpose of text generation is to automatically generate text that is indistinguishable from a text written by a human. If you want to learn how to generate text with Python,…

Break and Continue in Python

Break and Continue in Python

In Python, Break and Continue are statements executed inside a loop. These statements either skip according to the conditions inside loops or terminate loops at a point. If you want to learn all about the Break and Continue expressions in…

Reverse a String using Python

Reverse a String using Python

A string is a sequence of characters enclosed in single or double-quotes. String inversion is one of the most common problems in computer science. Here we need to reverse the characters of a string. So, if you want to learn…

SequenceMatcher in Python

SequenceMatcher in Python

SequenceMatcher is a class in Python available in the difflib module, which provides functions for comparing sequences in two different pieces of text. So whenever you want to compare two text files, you can explore the difflib module in Python.…

Python Project Ideas

Python Project Ideas

Python is one of the most popular programming languages today. In 2022, Python will be used more in the industry with programming languages like Golang and JavaScript. If you are looking for a job as a Python developer, the first…

QR Code using Python

QR Code using Python

A QR Code is a scannable code used to store information. QR codes are used to redirect you to a specific page or to show you some information. You must have scanned QR codes once in your life when making…

Query Data using Python

Query Data using Python

Query data means requesting specific data from a dataset. If you are familiar with SQL, you must know what it means to query data, but if you use the pandas library in Python, you can still query data from your…

Box Plot using Python

Box Plot using Python

A box plot is a statistical data visualization technique for analyzing the distribution and patterns of numerical data points of a dataset. It represents quartile 1, quartile 3, median, maximum and minimum data points of a feature which helps to…

Get Stock Price Data using Python

Get Stock Price Data using Python

As machine learning practitioners, we need to collect stock price data for regression analysis and time series analysis. We can easily download it from Yahoo Finance. But imagine if we want to create an application where we can analyze the…

Candlestick Chart using Python

Candlestick Chart using Python

A candlestick chart is a data visualization tool used to analyze the price movements of stocks, cryptocurrencies, currencies, and other financial instruments. If you work as a data scientist/analyst in the finance domain, a candlestick chart is one of the…

Useful Python Scripts

Useful Python Scripts

There are some pieces of scripts or code that we generally use in the middle of several tasks daily. For example, whenever I work on a sentiment analysis task, I always use one common script to clean the text column…

Send Instagram Messages using Python

Send Instagram Messages using Python

By using a third-party application or API to manage the functionality of an application, you are automating the application. If you send messages, post photos or videos, or follow someone without opening your Instagram directly, that means you are automating…

Voice Recorder using Python

Voice Recorder using Python

A voice recorder is found in every smartphone and computer today. It is an application that is used to record sound and save it in a specific file format, which can be listened to and transferred to another device. If…

Swap Items of a Python List

Swap Items of a Python List

Swapping elements of a Python list is very similar to swapping values of the variables in Python. We use the index of the items to swap the position of the items, just like variables in Python. So if you want…

LCM using Python

LCM using Python

LCM stands for Least Common Multiple, which means finding the smallest number that is a multiple of two or more numbers. If you want to learn how to find the LCM of two numbers using the Python programming language, then…

Age Calculator using Python

Age Calculator using Python

Age Calculator is an amazing coding project idea for beginners. If you are new to any programming language, you should try making an age calculator. It is an application where a user enters his date of birth as an input,…

Collage Maker using Python

Collage Maker using Python

A collage maker is a tool used to merge different images into one. It allows you to save and share images as a collection of memories. You must have seen an option to create a photo collage on your smartphone…

End-to-End Encryption using Python

End-to-End Encryption using Python

End-to-end encryption is a system that ensures that only the users involved in the communication can understand and read the messages. Many applications use end-to-end encryption to protect their users’ data. So, if you want to know how to protect…

Resize Image using Python

Resize Image using Python

Resizing images is one of the most important tasks in image processing. Sometimes we have to resize the images while working with them. There are many libraries in Python that can be used for this task, so if you want…

Calendar GUI using Python

Calendar GUI using Python

A calendar is an application that helps organize days. You must have seen a calendar in your home, on your computer, and even on your smartphone. If you want to learn how to create a graphical user interface for a…

String Formatting in Python

String Formatting in Python

String formatting plays an important role when storing and transferring data in a way that anyone can easily understand. If you are new to the Python programming language and don’t know how to format strings to display the output, this…

Resume Scanner using Python

Resume Scanner using Python

A resume scanner is an application that scans all the keywords on a resume to match the skills and qualifications needed for a particular job. If you want to learn how to scan a resume using the Python programming language,…

Read Images using Python

Read Images using Python

Python is a very popular programming language among the data science community because it has many libraries and frameworks for working on different types of data. Sometimes we need to use machine learning algorithms on images rather than a textual…

Swap Variables using Python

Swap Variables using Python

Swapping variables means assigning the value of variable a to variable b and vice versa. We have so many algorithms in computer science for swapping the values of two variables with each other, so in this article, I’m going to…

Quartile Deviation using Python

Quartile Deviation using Python

Quartile deviation means the absolute measure of dispersion. It is the product of half the difference between the upper and lower quartiles (Quartile Deviation = (Q3 – Q1)/2). In this article, I will take you through how to calculate quartile…

Pyramid Pattern using Python

Pyramid Pattern using Python

Creating patterns by using a programming language is not less than designing an algorithm for a beginner. One of the easiest patterns that you can create is a pyramid that looks like a triangle. So to get your hands on…

Find Maximum Profit using Python

Find Maximum Profit using Python

Finding the maximum profit while buying and selling stocks in the stock market is a great question for coding interviews at companies based on financial services. Here you are given an array of stock prices and transaction fees and what…

Create Tables using Python

Create Tables using Python

Python is a very easy and versatile programming language. It offers libraries and modules for almost every task that you can think about. While working with data using python sometimes it becomes difficult to present it in a tabular format…

Validate Anagrams using Python

Validate Anagrams using Python

An Anagram is a word or phrase that forms a different word or phrase when the letters of a word are rearranged. For example, the words “despair” and “praised” are anagrams. In this article, I’ll walk you through how to…

Format Dates using Python

Format Dates using Python

Formatting dates is one of the topics that every newbie faces when working with Python. When working with time-series data, formatting data and time is one of the most important topics for you. In this article, I’ll walk you through…

Defang IP Address using Python

Defang IP Address using Python

A user’s IP address is defanged to prevent the user from clicking on a malicious link. The problem with Defanginig IP addresses is one of the common coding interview questions for someone who is planning data science. In this article,…

Encrypt and Decrypt using Python

Encrypt and Decrypt using Python

Cryptography means changing the text of a message so that people who don’t know your secret never understand your message. In this article, I will create a GUI application to encrypt and decrypt using Python. How to Encrypt and Decrypt…

Bitcoin Mining with Python

Bitcoin Mining with Python

Bitcoin Mining is very much related to auditing. It means verifying the legitimacy of Bitcoin transactions. In this article, I will explain to you how to do Bitcoin Mining with Python. What is Bitcoin Mining? Bitcoin mining is part of…

Password Picker with Python

Password Picker with Python

A password prevents others from accessing our system’s e-mails and other login information. In this article, I’ll walk you through how to create a password picker with Python to create safe and easy-to-remember passwords that will help your information to…

Hangman Game with Python

Hangman Game with Python

The Hangman game is very much like the popular number guessing game among programmers. In this article, I will take you through how to create a Hangman Game with Python. Understanding the Hangman Game In the hangman game, one player…

URL Shortener with Python

URL Shortener with Python

You must have seen services on the internet to create short URLs from long ones used in various places. Short URLs are easy to remember or type, so they are very popular in the field of digital marketing and promotions.…

Mad Libs Game with Python

Mad Libs Game with Python

MAD LIBS is one of the funniest word games in the world. Some would even call it one of the greatest puns ever. In this article, I’ll walk you through a simple task for beginners: Create a Simple Mad Libs…

Story Generator with Python

Story Generator with Python

Do you think the most complex use of the random module in Python is random sampling? No, we can also generate random stories or anything beyond that using the random module. In this article, I’ll walk you through how to…

Count Rainy Days with Python

Count Rainy Days with Python

In this article, I will walk you through a numerical computational task with Python to count rainy days with python. Imagine you have a data series that represents the amount of precipitation each day for a year in a given…

Send Emails with Python

Send Emails with Python

Sometimes we can be in a situation where we need to send emails to multiple people in a personalized way. Although these emails follow the same format, the information they contain varies from recipient to recipient. In this article, I…