Kodewick
Start learning →
Basic←→0 / 100

Initials

#035BasicStringsLoops4 min

Initials are going to be sewn onto a school bag. Write initials(full_name) to take the first letter of each word, in capitals, joined together. There may be several spaces between words; an empty name gives "".

Examples
initials("ada lovelace")→'AL'
initials("Mary Jane Watson")→'MJW'
main.py
def initials(full_name):
    result = ""
    for word in full_name.split():
        # your code here: add this word's first letter, as a capital
        pass
    return result
Ctrl + Enter runs too
Result

Run tries the examples. When they look right, Submit.