Computer Science, asked by gayuKashyap, 2 months ago

WAP to count number of vowels ,consonents, digits and space in a string in python with output

Answers

Answered by kajal3917
4

Explanation:

Program to count the number of vowels, consonants, digits and special characters in a string are discussed here. Given a string, print the count of vowels, consonants, digits, spaces and special characters.

Input and Output Format:

Input consists of a string. Assume the maximum length of the string is 200. The characters in the string can contain both uppercase and lowercase.

Sample Input & Output format:

Input:

This program is very easy 2 complete

Output:

Vowels : 10

Consonants : 19

White spaces : 6

Digits : 1

Symbols : 0

Algorithm to count the number of vowels, consonants, digits and special characters in a string



Input the string from the user.

Initialize vowels = consonants = digits = symbols = spaces = 0.

Check every character and the string and update the variables accordingly.

Print all the variables.

Answered by ratanlaljanagal1973
2

Answer:

❤️❤️☺️☺️

Explanation:

Program to count the number of vowels, consonants, digits and special characters in a string are discussed here.

  1. Input the string from the user.
  2. Initialize vowels = consonants = digits = symbols = spaces = 0.
  3. Check every character and the string and update the variables accordingly.
  4. Print all the variables.
Similar questions