Module 3 4930
Daniel Tafmizi Dr. Friedman Lis 4930 May 27, 2024 Module 3 # 1: Write a function that takes in a person's name, and prints out a greeting. # list of friends friends = [ "John" , "Michael" , "Oliver" ] # list of greetings greetings = [ "hello [friend], how are you doing." , "Hows the weather treating you [friend]." , "How ya been [friend]." ] # goes through greetings for x in greetings: # goes through friends for y in friends: #replaces [friend] with friends (y) final = x.replace( "[friend]" , y) print (final) # 2: Full name function #function that accepts two objects def full_name (x,y): #Formats result by stripping white space on either end and creates greeting print ( "Hello, " + str .strip(x) + " " + str .strip(y)) full_name( "Daniel" , "Tafmizi" ) full_name( " Doctor " , " Friedman" ) full_name( "Abraha...