## Python Map | Length of the Longest Consecutive 1’s in Binary Representation of a given integer

Given a number n, find length of the longest consecutive 1s in its binary representation. Examples: Input : n = 14 Output : 3 The… Read More »

## Python program to find the most occurring character and its count

Given a string, write a python program to find the most occurrence character and its number of occurrences. Examples: Input : hello Output : (‘l’,… Read More »

## Program to print the pattern ‘G’

In this article, we will learn how to print the pattern G using stars and white-spaces. Given a number n, we will write a program… Read More »

## Python | Sort the values of first list using second list

Given two lists, sort the values of one list using the second list. Examples: Input : list1 = [“a”, “b”, “c”, “d”, “e”, “f”, “g”,… Read More »

## Python Program for Find sum of even factors of a number

Given a number n, the task is to find the even factor sum of a number. Examples: Input : 30 Output : 48 Even dividers… Read More »

## Python Program for Check if all digits of a number divide it

Given a number n, find whether all digits of n divide it or not. Examples: Input : 128 Output : Yes 128 % 1 ==… Read More »

## Python Program for Find the perimeter of a cylinder

Given diameter and height, find the perimeter of a cylinder. Perimeter is the length of the outline of a two – dimensional shape. A cylinder… Read More »

## Python Program for Find remainder of array multiplication divided by n

Given multiple numbers and a number n, the task is to print the remainder after multiply all the number divide by n. Examples: Input :… Read More »

## Python Program for focal length of a spherical mirror

Focal length is the distance between the center of the mirror to the principal foci. In order to determine the focal length of a spherical… Read More »

## Python Program for Find sum of odd factors of a number

Given a number n, the task is to find the odd factor sum. Examples: Input : n = 30 Output : 24 Odd dividers sum… Read More »

## Python program to count number of vowels using sets in given string

Given a string, count the number of vowels present in given string using Sets. Prerequisite: Sets in Python Examples: Input : GeeksforGeeks Output : No.… Read More »

## Python Program for Program to calculate area of a Tetrahedron

A Tetrahedron is simply a pyramid with a triangular base. It is a solid object with four triangular faces, three on the sides or lateral… Read More »

## Communication between Parent and Child process using pipe in Python

Prerequisite – Creating child process in Python As there are many processes running simultaneously on the computer so it is very necessary to have proper… Read More »

## Python Program for Find largest prime factor of a number

Given a positive integer \’n\'( 1 = 1     # equivalent to n /= 2                # n must be odd at this point,      # thus… Read More »

## Program to print ASCII Value of a character

Given a character, we need to print its ASCII value in C/C++/Java/Python. Examples : Input : a Output : 97 Input : D Output :… Read More »