Check character is digit using ‘isdigit()’ in Python

Check character is digit using 'isdigit()'

In this tutorial we are going to check if the character is Digit ( 0-9) or not using isdigit() function in python. Problem statement For the any input character we have to check character is digit or not. For example: Our logic to check given character is digit or not using ‘isdigit()’ function Algorithm to … Read more

Replace Space of string with character using replace() in Python

Python program to replace a string with given character using replace() function

In this tutorial we are going to learn writing python program to replace a space of string with given character. Problem Statement Our problem statement is, We have one string and a character. Now we want to replace that input character with the all space of string. The main string where the space are available … Read more

Python program to check given input is digit or not

Check Given Input Is Digit Or Not in python

In this tutorial we are going to learn writing program to check if the a given input is Digit ( 0-9) or not. We will also see the explanation on this python program. Problem statement For the any input, We have to check a given input character is digit or not. For example: Our logic … Read more

Python program to calculate the power using ‘while-loop’

Calculate The Power Using While-Loop in python

In this tutorial, we are going to learn a python program to calculate the power of a given number without using inbuild python pow function. Problem Statement For any two numbers that are inputs given by the user, one is the base value let’s say it as ‘x’ and the other is the exponent let’s … Read more

Python program to calculate the power using ‘for-loop’

Calculate The Power Using For-Loop in python

In this tutorial, we are going to learn a python program to calculate the power of a given number. Problem Statement For any two numbers that are inputs given by the user, one is the base value let’s say it as ‘x’ and the other is the exponent let’s say it as ‘y’, we have … Read more

Python program to calculate the power using ‘pow()’ method

Calculate The Power Using Pow() Method in python

In this tutorial, we are going to learn a python program to calculate the power of a given number. Problem Statement For any two numbers that are inputs given by the user, one is the base value let’s say it as ‘x’ and the other is the exponent let’s say it as ‘y’, we have … Read more

Python program to calculate the square of a number

Calculate The Square Of A Number in python

In this tutorial, we are going to learn a python program to calculate the square of a given number. Problem Statement For any number that are inputs given by the user, we have to print x2, i.e. square of that number.  For example: Our logic to calculate the square of a given number Algorithm to … Read more

Python program to calculate the square root of a number

Calculate The Square Root Of A Number in python

In this tutorial, we are going to learn a python program to calculate the square root of a given number. Problem Statement For any number that are inputs given by the user, we have to print the square root of that number.  For example: Our logic to calculate the square root of a given number … Read more

Python program to find smallest number among three

python program to Find Smallest Number Among Three

In this tutorial, we are going to learn a python program to find the smallest number among three numbers that are given by the user. Problem Statement For three numbers that are inputs given by the user, we have to print the smallest among those 3 numbers.  For example: Our Logic to find smallest number … Read more

Python program to calculate the factorial using iterative approach

Calculate The Factorial Using Iterative Approach in python

In this tutorial, we are going to learn a python program to find the factorial of the number given as input from the user. Problem Statement For any numbers that are input by the user, we have to calculate the factorial of that numbers. For example: Factorial of a number The factorial of a number … Read more