id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

david.white@denison.edu cs111fall2019 > countNames
prev  |  next  |  chance

Write a function countNames(words) that returns the number of capitalized names in the list of strings named words. For example, countNames(['Fili', 'Oin', 'Thorin', 'and', 'Bilbo', 'are', 'characters', 'in', 'a', 'book', 'by', 'Tolkien']) should return 5.


countNames(['Patricia', 'Drew', 'Hank', 'and', 'Derick', 'sit', 'in', 'the', 'front', 'row']) → 4
countNames(['Accidental', 'capitalizations', 'matter', 'to', 'Captain', 'Capitalization', 'and', 'to', 'Miss', 'Manners']) → 5
countNames(['this', 'here', 'is', 'an', 'example', 'where', 'no', 'words', 'are', 'capitalized']) → 0

...Save, Compile, Run (ctrl-enter)

def countNames(words):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Copyright Nick Parlante 2017 - privacy