Niharika Aitam has Published 172 Articles

Python Program to Check Overlapping Prefix - Suffix in Two Lists

Niharika Aitam

Niharika Aitam

Updated on 19-Oct-2023 15:05:58

392 Views

Generally, a prefix is a sequence of characters that appear at the beginning of a string or list or tuple or number, and a suffix is a sequence of characters that appear at the end of a string or number or list or tuple. For example, when we consider the ... Read More

Python program to check if the given string is IPv4 or IPv6 or Invalid

Niharika Aitam

Niharika Aitam

Updated on 19-Oct-2023 15:04:18

2K+ Views

An IP address is the short form of Internet Protocol address, which is a numerical label assigned to each device connected to a computer network that uses the Internet Protocol for communication. It serves as an identifier for the device, allowing it to send and receive data over the network. ... Read More

Python program to check if number is palindrome (one-liner)

Niharika Aitam

Niharika Aitam

Updated on 19-Oct-2023 14:59:04

714 Views

Generally, palindrome is a word, phrase, number, or other sequence of characters that reads the same forwards and backwards. In the context of a Python program, a palindrome usually refers to a string or number that remains the same when its characters or digits are reversed. For example, let’s consider ... Read More

Python Program to check if elements to the left and right of the pivot are smaller or greater respectively

Niharika Aitam

Niharika Aitam

Updated on 19-Oct-2023 14:56:54

118 Views

Generally, pivot table is the table which contains the grouped values formed by aggregating the individual elements within one or more discrete categories. In Python, the term "pivot" is often associated with sorting algorithms or operations that involve rearranging elements based on a specific value or condition. The pivot can ... Read More

Python Program to check date in date range

Niharika Aitam

Niharika Aitam

Updated on 19-Oct-2023 14:43:57

2K+ Views

In this article we will learn how to check if the given input date falls in the specified date range or not. There are ways to do so; some of them are explained in detail. Using the datetime module Datetime module offers classes to manipulate the dates and times. This ... Read More

Python program to Check all strings are mutually disjoint

Niharika Aitam

Niharika Aitam

Updated on 19-Oct-2023 14:41:20

161 Views

String is one of the data structures which hold the data enclosed in double quotes or in single quotes i.e. any data type enclosed inside the quotes considered as string. It is immutable, once we define the data we cannot change or modify. In python we have a function called ... Read More

Python program to change the value of a dictionary if it equals K

Niharika Aitam

Niharika Aitam

Updated on 19-Oct-2023 14:38:42

124 Views

Dictionary is one of the data structure available in python to store any datatype of data in the format of key and value pair. It is denoted by {} curly braces. The key in the dictionary is unique and the values in the dictionary can be repeated. The key and ... Read More

Python program to calculate gross pay

Niharika Aitam

Niharika Aitam

Updated on 19-Oct-2023 14:36:00

495 Views

Basically Gross pay is the total amount paid to an employee for the total time he/she worked, i.e. this is the full amount of salary of an employee before the taxes and deductions. The Gross pay also includes the bonuses, overtime or reimbursements from an employer on top of the ... Read More

Python program to calculate square of a given number

Niharika Aitam

Niharika Aitam

Updated on 19-Oct-2023 14:27:05

2K+ Views

Square is the defined as the multiplication of the number by itself. The square of a number n is given as n2. Mathematically we can implement square of the number as follows. $\mathrm{n^{2}=n*n}$ In the same way we can calculate the square of a given number by using python language ... Read More

Python program to calculate Date, Month and Year from Seconds

Niharika Aitam

Niharika Aitam

Updated on 19-Oct-2023 14:23:07

940 Views

Generally, time is given in hours or minutes or seconds and from the given seconds, we can calculate the number of days, months and years. There are different modules and functions available in python such as datetime, time and divmod() which helps us to calculate the date month and year ... Read More

Previous 1 ... 5 6 7 8 9 ... 18 Next
Advertisements