In: Computer Science
'''
Problem 1: Formin' Functions
Define and complete the functions described below.
The functions are called in the code at the very bottom. So you
should be
able simply to run the script to test that your functions work as
expected.
'''
'''
* function name: say_hi
* parameters: none
* returns: N/A
* operation:
Uhh, well, just say "hi" when called. And by "say" I mean
"print".
* expected output:
>>> say_hi()
hi
'''
'''
* function name: personal_hi
* parameters: name (string)
* returns: N/A
* operation:
Similar to say_hi, but you should include the name argument in the
greeting.
* expected output:
>>> personal_hi("Samantha")
Hi, Samantha
'''
'''
* function name: introduce
* parameters: name1 (string)
name2 (string)
* returns: N/A
* operation:
Here you are simply including the two names in a basic
introduction.
* expected output:
>>> introduce("Samantha","Jerome")
Samantha: Hi, my name is Samantha!
Jerome: Hey, Samantha. Nice to meet you. My name is Jerome.
'''
# FUNCTIONS ARE CALLED BELOW HERE...NO NEED TO TOUCH ANYTHING
# UNLESS YOU WANT TO COMMENT SOMETHING OUT TO TEST THINGS
# ALONG THE WAY...
say_hi()
personal_hi("Larry")
personal_hi("Naomi")
introduce("Larry","Naomi")
''' Problem 1: Formin' Functions Define and complete the functions described below. The functions are called in the code at the very bottom. So you should be able simply to run the script to test that your functions work as expected. ''' ''' * function name: say_hi * parameters: none * returns: N/A * operation: Uhh, well, just say "hi" when called. And by "say" I mean "print". * expected output: >>> say_hi() hi ''' def say_hi(): print("hi") ''' * function name: personal_hi * parameters: name (string) * returns: N/A * operation: Similar to say_hi, but you should include the name argument in the greeting. * expected output: >>> personal_hi("Samantha") Hi, Samantha ''' def personal_hi(name): print("Hi, " + name) ''' * function name: introduce * parameters: name1 (string) name2 (string) * returns: N/A * operation: Here you are simply including the two names in a basic introduction. * expected output: >>> introduce("Samantha","Jerome") Samantha: Hi, my name is Samantha! Jerome: Hey, Samantha. Nice to meet you. My name is Jerome. ''' def introduce(name1, name2): print("{}: Hi, my name is {}!".format(name1, name1)) print("{}: Hey, {}. Nice to meet you. My name is {}.".format(name2, name1, name2)) # FUNCTIONS ARE CALLED BELOW HERE...NO NEED TO TOUCH ANYTHING # UNLESS YOU WANT TO COMMENT SOMETHING OUT TO TEST THINGS # ALONG THE WAY... say_hi() personal_hi("Larry") personal_hi("Naomi") introduce("Larry", "Naomi")