Python Program to count Vowels and Consonants in String

python program to Count Vowels And Consonants In String

In this tutorial, we are going to learn writing python programming to count the number of vowels (‘a’, ‘e’, ‘i’, ‘o’, ‘u’) and consonants (any alphabet other than vowels) in a string. Problem Statement For any input string, we have to count the number of vowels that appear and the number of consonants that appear. … Read more

Python program to print odd numbers from array (list)

python program to Print Odd Numbers From Array (List)

In this tutorial, we will learn writing program in Python to create an array (list in case of python) and print the odd elements stored in the array (list). Problem Statement Our program will first take the input of array (list) size and then the elements of the array (list) from the user. And then … Read more

Perform right rotation on array by two positions in Python

C Program To Perform Right Rotation In Array By Two Positions

In this tutorial, we will learn to create an array (list in case of python) and rotate the elements stored in the array (list) by two positions using python.  That means if our array (list) is: After two rotations: Problem Statement Our program will first take the input of array (list) size and then the … Read more

Perform right rotation by n on array (list) in Python

Python program to perform right rotation of array (list) elements by n positions

In this tutorial, we will learn to create an array (list in case of python) and rotate the elements stored in the array (list) by ‘n’ positions. The value of ‘n’ is also taken input by the user.  That means if our array (list) is: After the user inputs the rotation value 3, then the … Read more

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 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