Advertisement
JkSoftware

Day 10 - Return Functions

Nov 15th, 2021
795
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.31 KB | None | 0 0
  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
Add Comment
Please, Sign In to add comment
Advertisement