Advertisement
JkSoftware

Day 8 - More on functions

Nov 11th, 2021
845
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #create a function called greet()
  2. #Write 3 print statements inside the function
  3. #call the greet() function to run your code
  4.  
  5.  
  6. #
  7. # def greet():
  8. #     print("Hello!")
  9. #     print("Howdy")
  10. #     print("yo!")
  11.  
  12.  
  13. # greet()
  14.  
  15.  
  16.  
  17.         #Parameter: Name of data passed in
  18. def greet_(name):
  19.     print(f"Hello {name}")
  20.     print(f"How do you do {name}?")
  21.  
  22.        #Argument: Value of the data passed in
  23. greet_("Johnny")
  24. greet_("John")
  25. greet_("Angela")
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement