Sign in to test your solution.
# Teacher code program # ------------------------- # Subprograms # ------------------------- def tcode(teacher): letters = ["", ""] letters[0] = teacher[0] space = teacher.find(" ") letters[1] = teacher[space + 1: space + 3] teacher_code = "".join(letters) teacher_code = teacher_code.upper() return teacher_code # ------------------------- # Main program # ------------------------- teacher = input("Enter the name of the teacher: ") teacher_code = tcode(teacher) print(teacher_code)
You can submit as many times as you like. Only your latest submission will be taken into account.
Sign in to test your solution.

  Python sandbox

This window allows you to run Python code without installing a thing. The code you write here is not automatically submitted to Dodona.