class Programmer:
    """

    """
    def __init__(self, name: str, language: str, skills: int):
        self.name = name
        self.language = language
        self.skills = skills

    def watch_course(self, course_name, language, skills_earned) -> str:
        """
        check if player knows the language, so they can
        watch the course
        :param course_name:
        :param language:
        :param skills_earned:
        :return:
        """
        if language == self.language:
            self.skills += skills_earned
            return f'{self.name} watched {course_name}'
        return f'{self.name} does not know {language}'

    def change_language(self, new_language, skills_needed):
        if new_language == self.language:
            return f'{self.name} already knows {new_language}'
        if skills_needed > self.skills:
            return f'{self.name} needs {skills_needed - self.skills} more skills'
        old_language, self.language = self.language, new_language
        self.skills = 0
        return f'{self.name} switched from {old_language} to {new_language}'


programmer = Programmer("John", "Java", 50)
print(programmer.watch_course("Python Masterclass", "Python", 84))
print(programmer.change_language("Java", 30))
print(programmer.change_language("Python", 100))
print(programmer.watch_course("Java: zero to hero", "Java", 50))
print(programmer.change_language("Python", 100))
print(programmer.watch_course("Python Masterclass", "Python", 84))
