Advertisement
Adehumble

Week2 Coding Exercise 2

Feb 7th, 2020
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.45 KB | None | 0 0
  1. #2
  2. #The following lines of codes DEMONSTRATES THIS EXERCISE by accepting the last and first name of a user and prints their corresponding concatenation but returns an empty value if the user decides not to pass in any argument for his/her last name or first name.
  3.  
  4. def string_adder(a=" ", b=" "):
  5.     return a+" "+b
  6.  
  7. Last_name=input("Enter your Last name, ")
  8. First_name=input("Enter your First name, ")
  9. print("Welcome!",string_adder(Last_name, First_name))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement