Question: Two function definitions are saved in the same file: A function count _ vowels has one parameter, a word, and returns the number of vowels

Two function definitions are saved in the same file:
A function count_vowels has one parameter, a word, and returns the number of vowels in that word.
A function count_consonants has one parameter, a word, and returns the number of consonants in that word.
To determine the number of letters in a word, write a one-line body for the following function that calls both count_vowels and count_consonants:
def count_letters(word):
"'"'"(str) int
Return the number of letters in word.
> count_letters('hello')
5
> count_letters('bonjour')
7
# Write the one-line function body that belongs here.
Note:
do not call any functions other than those listed above
do not use any unnecessary parentheses
 Two function definitions are saved in the same file: A function

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!