What's Your Name?

Sort by

recency

|

1421 Discussions

|

  • + 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)
    
  • + 0 comments

    def print_full_name(first, last): print('Hello',first_name,last_name+'!','You just delved into python.')

    if name == 'main': first_name = input() last_name = input() print_full_name(first_name, last_name)

  • + 0 comments

    print(f"Hello {first_name} {last_name}! You just delved into python.")

  • + 0 comments

    def print_full_name(first, last): a=first.title() b=last.title() print (f"Hello {a} {b}! You just delved into python.")

  • + 0 comments

    def print_full_name(first, last): 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)