Question: IN python consonantCount (s2) Write the function consonantCount that counts how many times a consonant (either lowercase or uppercase) occurs in a string. It takes

IN python

IN python consonantCount (s2) Write the function consonantCount that counts how many

consonantCount (s2) Write the function consonantCount that counts how many times a consonant (either lowercase or uppercase) occurs in a string. It takes a string s as input and returns an integer, the number of consonants in the string. For this question, y and Y are not consonants. Please use a for loop to do the computation. Please do not use a brute force solution (comparing against one consonant at a time): it will not receive credit. Sample Input Sample Output 6 s2 - "abra cadabra'" s2"how many consonants?" s2 = "This is Hw4, folks" 10

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!