Pavitra has Published 177 Articles

Python program to check if the given string is vowel Palindrome

Pavitra

Pavitra

Updated on 23-Dec-2019 07:17:47

324 Views

In this article, we will learn about the solution to the problem statement given below.Problem statement − We are given string (containing both vowel and consonant letters), remove all consonants, then check if the resulting string is a palindrome or not.Here we first remove all the consonants present in the string. ... Read More

Python program to check if a given string is Keyword or not

Pavitra

Pavitra

Updated on 23-Dec-2019 07:13:45

299 Views

In this article, we will learn about the solution to the problem statement given below.Problem statement − We are given a number, we need to check that the number is a power of two or not.Keywords are the special words reserved by any language with specific usage and cannot be used ... Read More

Python Program for Number of elements with odd factors in the given range

Pavitra

Pavitra

Updated on 23-Dec-2019 07:03:27

384 Views

In this article, we will learn about the solution to the problem statement given below.Problem statement − We are given a range, we need to find the number of odd factors in the range.ApproachAs we all know that all perfect squares have an odd number of factors in a range. So ... Read More

Python Program for nth multiple of a number in Fibonacci Series

Pavitra

Pavitra

Updated on 23-Dec-2019 07:00:09

707 Views

In this article, we will learn about the solution to the problem statement given below.Problem statement− We are given a number, we need to find the nth multiple of a number k in Fibonacci number.The solution to the problem is discussed below−Example Live Demo# find function def find(k, n):    f1 ... Read More

Python Program for Efficient program to print all prime factors of a given number

Pavitra

Pavitra

Updated on 23-Dec-2019 06:43:38

233 Views

In this article, we will learn about the solution to the problem statement given below.Problem statement − We are given a number, we need to find all the prime factors of a given number.The efficient solution to the problem is discussed below −Example Live Demo# Python program to print prime factors import ... Read More

Python Program for Common Divisors of Two Numbers

Pavitra

Pavitra

Updated on 23-Dec-2019 06:40:33

399 Views

In this article, we will learn about the solution to the problem statement given below.Problem statement − We are given two integers, we need to display the common divisors of two numbersHere we are computing the minimum of the two numbers we take as input. A loop to calculate the ... Read More

Python Program to print all permutations of a given string

Pavitra

Pavitra

Updated on 20-Dec-2019 07:34:07

472 Views

In this article, we will learn about the solution to the problem statement given below.Problem statement − We are given a string we need to display all the possible permutations of the string.Now let’s observe the solution in the implementation below −Example Live Demo# conversion def toString(List):    return ''.join(List) # ... Read More

Python program to find uncommon words from two Strings

Pavitra

Pavitra

Updated on 20-Dec-2019 07:31:43

556 Views

In this article, we will learn about the solution to the problem statement given below.Problem statement − We are given two strings, we need to get the uncommon words from the given strings.Now let’s observe the solution in the implementation below −Example Live Demo# uncommon words def find(A, B):    # ... Read More

Python program to find number of local variables in a function

Pavitra

Pavitra

Updated on 20-Dec-2019 07:29:18

726 Views

In this article, we will learn about the solution to the problem statement given below.Problem statement − We are given a function, we need to display the number of local variables in the function.Now let’s observe the solution in the implementation below −Example Live Demo# checking locals def scope():    a ... Read More

Python Program to Count trailing zeroes in factorial of a number

Pavitra

Pavitra

Updated on 20-Dec-2019 07:24:23

622 Views

In this article, we will learn about the solution to the problem statement given below.Problem statement − We are given an integer n, we need to count the number of trailing zeros in the factorial.Now let’s observe the solution in the implementation below −Example Live Demo# trailing zero def find(n):   ... Read More

Previous 1 ... 3 4 5 6 7 ... 18 Next
Advertisements