Vikram Chiluka has Published 288 Articles

How to Align Text Strings using Python?

Vikram Chiluka

Vikram Chiluka

Updated on 24-Jan-2023 19:02:30

23K+ Views

In this article, we will learn how to align text strings using Python. We will be using f-strings for this aligning text strings in python. Python's Text Alignment feature is helpful for printing output that is well and cleanly formatted. Sometimes the length of the data to be printed varies, ... Read More

Finding unique elements from Tuple in Python

Vikram Chiluka

Vikram Chiluka

Updated on 24-Jan-2023 09:28:50

1K+ Views

In this article, we will learn a Python program to find unique elements from a tuple. Methods Used The following are the various methods to accomplish this task − Using for loop and append() function Using collections.Counter() function Using set() function Tuples are an immutable, unordered data type ... Read More

Find the maximum element of each row in a matrix using Python

Vikram Chiluka

Vikram Chiluka

Updated on 23-Jan-2023 14:28:16

2K+ Views

In this article, we will learn a python program to find the maximum element of each row in a matrix. Assume we have taken an NxN input matrix. We will now find the maximum element of each row in an input matrix using the below methods. Methos Used The following ... Read More

Find the least frequent element in an array using Python

Vikram Chiluka

Vikram Chiluka

Updated on 23-Jan-2023 14:25:33

645 Views

In this article, we will learn the python program for getting the least frequent element in an array. Methods Used The following are the various methods to accomplish this task − Using sort() function(Naive Approach) Using Hashing Using Counter() Function Method 1: Using sort() function(Naive Approach) Running two ... Read More

Decoding and encoding hexadecimal digitals using Python

Vikram Chiluka

Vikram Chiluka

Updated on 23-Jan-2023 14:23:43

3K+ Views

In this article, we will learn how to decode and encode hexadecimal digits using python. Methods Used Using binascii module Using the base64 module Method 1: Using Binascii Module There are several methods to convert between binary and different ASCII-encoded binary representations in the binascii module. Use ... Read More

Decimal Equivalents of 1/2, 1/3, . . . ,1/10 in Python

Vikram Chiluka

Vikram Chiluka

Updated on 23-Jan-2023 14:12:17

986 Views

In this article, we will learn a python program that prints out the decimal equivalents of 1/2, 1/3, 1/4, . . . ,1/10. Methods Used The following are the various methods to accomplish this task − Printing Decimal Equivalent of 1/2 Using the range() function Using the decimal module ... Read More

Computing sums of diagonals of a matrix using Python

Vikram Chiluka

Vikram Chiluka

Updated on 23-Jan-2023 14:10:23

1K+ Views

In this article, we will learn a python program to efficiently compute sums of diagonals of a matrix. Methos Used The following are the various methods to accomplish this task − Using Nested For Loops Using Only Single Loop In a matrix we have two diagonals − ... Read More

Check if the matrix is lower triangular using Python

Vikram Chiluka

Vikram Chiluka

Updated on 23-Jan-2023 14:07:40

231 Views

In this article, we will learn a python program to check if a matrix is lower triangular. Assume we have taken an input matrix. We will now check whether the input matrix is lower triangular using the below methods. Methos Used The following are the various methods to accomplish this ... Read More

Check if a number in a list is perfect square using Python

Vikram Chiluka

Vikram Chiluka

Updated on 23-Jan-2023 14:03:46

1K+ Views

In this article, we will learn a Python program to check if a number is a Perfect Square in a List. What is a Perfect Square? A perfect square is an integer that can be written as the square of another integer. It is referred to as the product of ... Read More

Check if a matrix is symmetric using Python

Vikram Chiluka

Vikram Chiluka

Updated on 23-Jan-2023 14:01:28

2K+ Views

In this article, we will learn a python program to check if a matrix is symmetric. What is a Symmetric Matrix? If the transpose of a square matrix matches the original matrix, the matrix is said to be symmetric. By changing from row to column and from column to row, ... Read More

Advertisements