Question: Write ( define ) a function named count _ caps, that takes one argument ( you can safely assume that arguments will always be a
Write define a function named countcaps, that takes one argument you can safely assume that arguments will always be a str with a length of at least one When this function is called, it should return an int that indicates the total number of capital letters in the argument.
Examples:
countcapsHeLLo will return
countcapsBob Smith' will return
countcapsabcdefg will return
Hints:
the isupper function might come in handy for this problem.
You may wish to write some additional code to test your function. Please be sure that you delete or comment out any test code before you submit your solution. The only code in your solution when you submit should be the required function definition.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
