Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

#Write a function called count_capital_consonants. This #function should take as input a string, and return as output #a single integer. The number the function returns

#Write a function called count_capital_consonants. This

#function should take as input a string, and return as output

#a single integer. The number the function returns should be

#the count of characters from the string that were capital

#consonants. For this problem, consider Y a consonant.

#

#For example:

#

# count_capital_consonants("Georgia Tech") -> 2

# count_capital_consonants("GEORGIA TECH") -> 6

# count_capital_consonants("gEOrgIA tEch") -> 0

#Write your function here!

#The lines below will test your code. Feel free to modify

#them. If your code is working properly, these will print

#the same output as shown above in the examples.

print(count_capital_consonants("Georgia Tech"))

print(count_capital_consonants("GEORGIA TECH"))

print(count_capital_consonants("gEOrgIA tEch"))

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions