What's Your Name?

  • + 0 comments
    def print_full_name(first: str, last: str) -> None:
        """Print a welcome string with users first and last name"""
        
        if not all(isinstance(x, str) for x in (first, last)):
            raise TypeError("First and last name must be strings.")
    
        if any(len(x) > 10 for x in (first, last)):
            raise ValueError("First and last name must be at most 10 characters long.")
    
        print(f"Hello {first} {last}! You just delved into python.")
    
    
    if __name__ == '__main__':
        first_name = input()
        last_name = input()
        print_full_name(first_name, last_name)