Write a Python program to accept a string from the user and then print the number of vowels, consonants, digits and special characters in the string. For example, if the user enters "Hello@123", the output should be:

Vowels: 2

Consonants: 3

Digits: 3

Special characters: 1

Answer:

Answer by student

Python program to accept a string from the user and then print the number of vowels, consonants, digits and special characters in the string - Teachoo.png

Detailed answer by teachoo

The rest of the post is locked. Join Teachoo Black to see the full post.

Ask a doubt
Davneet Singh's photo - Co-founder, Teachoo

Made by

Davneet Singh

Davneet Singh has done his B.Tech from Indian Institute of Technology, Kanpur. He has been teaching from the past 14 years. He provides courses for Maths, Science, Social Science, Physics, Chemistry, Computer Science at Teachoo.