Check if a string has a number or not

In this program, we will take a string as input and check if a string has a number or not.

Steps to solve the program
  1. Take a string as input.
  2. Create a count variable and assign its value equal to 0.
  3. Use for loop to iterate over each character of the string.
  4. If the character is a number add 1 to the count variable.
  5. Use isnumeric() to check for numbers.
  6. If in the end count is greater is 0 then the string has a number.
  7. Print the output. 

Output :

print characters at even places in a string.

count the number of vowels in a string.

Leave a Comment