Kodewick
Start learning →
Basic←→0 / 100

Make a username

#094BasicStringsNumbers4 min

The school makes everyone a username: the first letter of the first name, then the surname, then the last two digits of the birth year, all lower case. Write make_username(first, last, year): ("Lin", "Zhou", 2008) gives "lzhou08".

Examples
make_username("Lin", "Zhou", 2008)→'lzhou08'
make_username("Amy", "Park", 2011)→'apark11'
main.py
def make_username(first, last, year):
    digits = str(year)[-2:]
    # your code here: initial + surname + digits, then lower case
    pass
Ctrl + Enter runs too
Result

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