Advertisement
JkSoftware

Day 10 - Return Functions

Nov 15th, 2021
694
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def format_name(f_name, l_name):
  2.     if f_name == "" or l_name == "":
  3.         return "You didn't provide valid inputs"
  4.     f_name = f_name.title()
  5.     l_name = l_name.title()
  6.     return f"Result: {f_name} {l_name}"
  7.    
  8.  
  9.  
  10. print(format_name(input("What is your first name? "), input("What is your last name? ")))
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement