All problems

Capitalize Each Word

easyPythonStrings

A print shop takes customer text for name badges and has to set it in the house style before it goes to the engraver: every word starts with a capital and the rest of that word is lower case, however the customer happened to type it. The operator pastes one line in and the tool shows the corrected version.

Task: Read one line of text and print it in the house style.

Input

A single line holding 1 to 20 words separated by single spaces. Words are letters only. The text may arrive in any mixture of upper and lower case.

Output

One line holding the same words in the same order, separated by single spaces, each word with its first letter in upper case and all of its other letters in lower case.

Example:

Input:
the quick brown fox

Output:
The Quick Brown Fox

Sign in to solve this problem

Reading problems is free for everyone — solving them (Run, Submit, and tracking what you've solved) needs an account.

Sign in

Discussion

Sign in to join the discussion — reading is open to everyone.

Loading comments…