Question: Write a Python function called count _ vowels _ and _ consonants ( word ) that counts the number of vowels and consonants in a

Write a Python function called count_vowels_and_consonants(word) that counts
the number of vowels and consonants in a given string passed to it as its
parameters (10 pts). Return vowel and consonant counts and print the message.
Examples
word = "catastrophic world"
vowels_count, consonant_count = count_vowels_and_consonants(word)
There are 5 vowels and 12 consonants in catastrophic world.
word = "indispensable"
vowels_count, consonant_count = count_vowels_and_consonants(word)
There are 5 vowels and 8 consonants in indispensable.
Variables:
vowels_count, consonant_count
Parameter: word
"""
VOWELS = "aeiou"
# Write your solution for problem 3 here.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!