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

 

konstans@stuy.edu all > capitalizeSentence
prev  |  next  |  chance

Given a string that contains one or more sentences, return the string with each word capitalized. (Only the first letter of each word upper case) You can assume proper spacing between words and punctuation, that is a space after commas, semicolons, and other punctuation. (see examples)


capitalizeSentence('') → ''
capitalizeSentence('ab') → 'Ab'
capitalizeSentence('This is not a simple question.') → 'This Is Not A Simple Question.'

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

def capitalizeSentence(s):

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