Solve problem "Uppercase" online - Learn Python 3 - Snakify

Problem «Uppercase» (Medium)


Write a function capitalize(lower_case_word) that takes the lower case word and returns the word with the first letter capitalized. Eg., print(capitalize('word')) should print the word Word.

Then, given a line of lowercase ASCII words (text separated by a single space), print it with the first letter of each word capitalized using the your own function capitalize().

In Python there is a function ord(character), which returns character code in the ASCII chart, and the function chr(code), which returns the character itself from the ASCII code. For example, ord('a') == 97, chr(97) == 'a'.

In all the problems input the data using input() and print the result using print().

Saved solutions


Input Correct answer Result
harry potter
Harry Potter
we danced the mamushka at waterloo
We Danced The Mamushka At Waterloo
de noche todos los gatos son pardos
De Noche Todos Los Gatos Son Pardos
all i see turns to brown
All I See Turns To Brown