## Python program to convert hex string to decimal Pavitra

Updated on 23-Dec-2019 07:35:02

In this article, we will learn about the solution to the problem statement given below.Problem statement − We are given a hexadecimal string, we need to convert it into its decimal equivalent.We have two approaches to solve the problem−Brute-force ApproachUsing Built-in moduleBrute-Force MethodHere we take the help of explicit type casting ... Read More

## Convert decimal to binary number in Python program Pavitra

Updated on 23-Dec-2019 07:31:57

In this article, we will learn about the solution to the problem statement given below.Problem statement − We are given a decimal number, we need to convert it into its binary equivalent.There are two approaches to solve the given problem. Let’s see them one by one−Recursive ApproachExample Live Demodef DecimalToBinary(num):    if ... Read More

## Convert a list to string in Python program Pavitra

Updated on 23-Dec-2019 07:28:22

In this article, we will learn about the solution to the problem statement given below.Problem statement − We are given a list iterable, we need to convert it into a string type iterable.There are four approaches to solve the given problem. Let’s see them one by one−Brute-force ApproachExample Live Demodef listToString(s):   ... Read More

## Python Program to Check Prime Number Pavitra

Updated on 23-Dec-2019 07:25:54

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 whether the given number is a prime number or not.A given positive number greater than 1 which has no other factors except 1 and the ... Read More

## Python program to check if the given string is vowel Palindrome Pavitra

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

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

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

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

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

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

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

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

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

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

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

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

Previous 1 ... 3 4 5 6 7 8 9 ... 24 Next